 	query.ins 'test_table', id: 3, data: 'third'
 	count = +query.val 'SELECT count(*) FROM test_table'
 	data = query.val 'SELECT data FROM test_table WHERE id = 3'
-	
+
 	test.strictEqual count, 3, 'should insert one row'
 	test.strictEqual data, 'third', 'should add strings correctly'
 	test.done()

exports.val = (test) ->
	data = query.val 'SELECT data FROM test_table WHERE id = 2'
	test.deepEqual data, 'second', 'should return the first and only value from the first and only row'
	
	test.throws (->
		query.val 'SELECT id, data FROM test_table WHERE id = 2'
	), Error, 'should throw error if more than one value returned'
	
	test.throws (->
		query.val 'SELECT * FROM test_table'
	), Error, 'should throw error if more than one row returned'
	
	test.throws (->
		query.val 'SELECT * FROM test_table WHERE id = 3'
	), Error, 'should throw error if no rows returned'

exports.row = (test) ->
	row = query.row 'SELECT * FROM test_table WHERE id = 1'
	test.deepEqual row, {id: 1, data: 'first'}, 'should return the first and only row from query'

	test.throws (->
		query.row 'SELECT * FROM test_table'
	), Error, 'should throw error if more than one row returned'

	test.throws (->
		query.row 'SELECT * FROM test_table WHERE id = 3'
	), Error, 'should throw error if no rows returned'
