Skip to content

Commit

Permalink
submodule update (joli.js) + added one test for the HAVING clause
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Jul 11, 2012
1 parent 96403d1 commit 17a07b5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/lib/vendor/joli.js
Submodule joli.js updated 1 files
+1 −1 joli.js
3 changes: 3 additions & 0 deletions Resources/test/query.js
Expand Up @@ -32,6 +32,9 @@
});

it('joli.query.having()', function() {
q = new joli.query().select('count(human.id) as nb_humans').from('human').where('first_name = ?', 'michel').groupBy('city_id').having('nb_humans > ?', 1);
expect(q.getQuery()).toBe('select count(human.id) as nb_humans from human where first_name="michel" group by city_id having nb_humans > "1"');

q = new joli.query().select('count(human.id) as nb_humans').from('human').groupBy('city_id').having('nb_humans > ?', 1);
expect(q.getQuery()).toBe('select count(human.id) as nb_humans from human group by city_id having nb_humans > "1"');
});
Expand Down

0 comments on commit 17a07b5

Please sign in to comment.