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 17a07b5 commit 62499ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/test/query.js
Expand Up @@ -33,7 +33,7 @@

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"');
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 62499ea

Please sign in to comment.