diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-06 20:15:53 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-04-06 20:15:53 +0200 |
commit | 80c0e3df5998a2a4b2376a6361f4690b783446df (patch) | |
tree | 9342ca172a57bba002eee0f76430cb4067de4527 /tests/codeigniter | |
parent | c0dd3986b5cf45dcf9de42d761b9641836bc6c93 (diff) |
Check the insert result
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/database/query_builder/insert_test.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/codeigniter/database/query_builder/insert_test.php b/tests/codeigniter/database/query_builder/insert_test.php index 78587d2e9..5dfccce82 100644 --- a/tests/codeigniter/database/query_builder/insert_test.php +++ b/tests/codeigniter/database/query_builder/insert_test.php @@ -29,6 +29,12 @@ class Insert_test extends CI_TestCase { // Do normal insert $this->assertTrue($this->db->insert('job', $job_data)); + + $job_1 = $this->db->get('job')->row(); + + // Check the result + $this->assertEquals('Grocery Sales', $job_1->name); + } // ------------------------------------------------------------------------ @@ -45,6 +51,11 @@ class Insert_test extends CI_TestCase { // Do insert batch $this->assertTrue($this->db->insert_batch('job', $job_datas)); + + $job_2 = $this->db->get_where('job', array('id' => 2))->row(); + + // Check the result + $this->assertEquals('Commedian', $job_2->name); } }
\ No newline at end of file |