From 81b6b5d4ea2e63159c443bae19880a78f6ac2f9f Mon Sep 17 00:00:00 2001 From: Taufan Aditya Date: Fri, 6 Apr 2012 17:58:22 +0700 Subject: Insert test --- .travis.yml | 3 ++- tests/codeigniter/database/query_builder/insert_test.php | 7 +++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97ea0422d..971f62f38 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,4 +25,5 @@ script: phpunit --configuration tests/travis/$DB.phpunit.xml branches: only: - develop - - master \ No newline at end of file + - master + - db-tests \ No newline at end of file diff --git a/tests/codeigniter/database/query_builder/insert_test.php b/tests/codeigniter/database/query_builder/insert_test.php index 5607e8ce1..80073b9ba 100644 --- a/tests/codeigniter/database/query_builder/insert_test.php +++ b/tests/codeigniter/database/query_builder/insert_test.php @@ -12,7 +12,6 @@ class Insert_test extends CI_TestCase { $this->db = Mock_Database_Schema_Skeleton::init(DB_DRIVER); Mock_Database_Schema_Skeleton::create_tables(); - Mock_Database_Schema_Skeleton::create_data(); } // ------------------------------------------------------------------------ @@ -22,7 +21,7 @@ class Insert_test extends CI_TestCase { */ public function test_insert() { - $job_data = array('name' => 'Grocery Sales', 'description' => 'Discount!'); + $job_data = array('id' => 1, 'name' => 'Grocery Sales', 'description' => 'Discount!'); // Do normal insert $this->assertTrue($this->db->insert('job', $job_data)); @@ -36,8 +35,8 @@ class Insert_test extends CI_TestCase { public function test_insert_batch() { $job_datas = array( - array('name' => 'Commedian', 'description' => 'Theres something in your teeth'), - array('name' => 'Cab Driver', 'description' => 'Iam yellow'), + array('id' => 2, 'name' => 'Commedian', 'description' => 'Theres something in your teeth'), + array('id' => 3, 'name' => 'Cab Driver', 'description' => 'Iam yellow'), ); // Do insert batch -- cgit v1.2.3-24-g4f1b