Include insert test
diff --git a/.travis.yml b/.travis.yml
index 97ea042..971f62f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,4 +25,5 @@
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
new file mode 100644
index 0000000..5607e8c
--- /dev/null
+++ b/tests/codeigniter/database/query_builder/insert_test.php
@@ -0,0 +1,47 @@
+<?php
+
+class Insert_test extends CI_TestCase {
+
+ /**
+ * @var object Database/Query Builder holder
+ */
+ protected $db;
+
+ public function set_up()
+ {
+ $this->db = Mock_Database_Schema_Skeleton::init(DB_DRIVER);
+
+ Mock_Database_Schema_Skeleton::create_tables();
+ Mock_Database_Schema_Skeleton::create_data();
+ }
+
+ // ------------------------------------------------------------------------
+
+ /**
+ * @see ./mocks/schema/skeleton.php
+ */
+ public function test_insert()
+ {
+ $job_data = array('name' => 'Grocery Sales', 'description' => 'Discount!');
+
+ // Do normal insert
+ $this->assertTrue($this->db->insert('job', $job_data));
+ }
+
+ // ------------------------------------------------------------------------
+
+ /**
+ * @see ./mocks/schema/skeleton.php
+ */
+ public function test_insert_batch()
+ {
+ $job_datas = array(
+ array('name' => 'Commedian', 'description' => 'Theres something in your teeth'),
+ array('name' => 'Cab Driver', 'description' => 'Iam yellow'),
+ );
+
+ // Do insert batch
+ $this->assertTrue($this->db->insert_batch('job', $job_datas));
+ }
+
+}
\ No newline at end of file