summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorTaufan Aditya <toopay@taufanaditya.com>2012-05-04 14:42:24 +0200
committerTaufan Aditya <toopay@taufanaditya.com>2012-05-04 14:42:24 +0200
commitf7377abee2ef1e165a362edc9a1c650373a002ca (patch)
tree1b77a048954683a135f4c5028ab28951a9538f1b /tests/codeigniter
parent4e607b00b2c56b7fdcc5f1d1a290be2363c74a46 (diff)
Trace error
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/database/query_builder/group_test.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/codeigniter/database/query_builder/group_test.php b/tests/codeigniter/database/query_builder/group_test.php
index ddb2d0d6a..dd248ae9a 100644
--- a/tests/codeigniter/database/query_builder/group_test.php
+++ b/tests/codeigniter/database/query_builder/group_test.php
@@ -22,16 +22,16 @@ class Group_test extends CI_TestCase {
*/
public function test_group_by()
{
- $jobs = $this->db->select('name')
+ $jobs = $this->db->select('job.name as job_name, job.id as job_id')
->from('job')
- ->group_by('name HAVING SUM(id) > 2')
+ ->group_by('job_name HAVING SUM(job_id) > 2')
->get()
->result_array();
// Check the result
$this->assertEquals(2, count($jobs));
- $this->assertEquals('Accountant', $jobs[0]['name']);
- $this->assertEquals('Musician', $jobs[1]['name']);
+ $this->assertEquals('Accountant', $jobs[0]['job_name']);
+ $this->assertEquals('Musician', $jobs[1]['job_name']);
}
} \ No newline at end of file