 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'

	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.itself = (test) ->
	result = query "INSERT INTO test_table (id, data) VALUES (3, 'third')"
	test.deepEqual typeof(result), 'object', 'should return dbConnection.query result'
	test.deepEqual result.command, 'INSERT', 'should return correct dbConnection.query result'

	result = query.all 'SELECT * FROM test_table'
	test.strictEqual result.length, 3, 'should execute the given query'

	query "DELETE FROM test_table WHERE id = 3"
	test.done()

