summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/codeigniter/database/query_builder/group_test.php8
-rwxr-xr-xtests/mocks/database/ci_test.sqlitebin17408 -> 19456 bytes
2 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
diff --git a/tests/mocks/database/ci_test.sqlite b/tests/mocks/database/ci_test.sqlite
index 86d868af2..e4128b23f 100755
--- a/tests/mocks/database/ci_test.sqlite
+++ b/tests/mocks/database/ci_test.sqlite
Binary files differ