summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/database/query_builder
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/database/query_builder')
-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