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 7fc6fe0 commit 96403d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/lib/vendor/joli.js
Submodule joli.js updated 1 files
+29 −0 joli.js
5 changes: 5 additions & 0 deletions Resources/test/query.js
Expand Up @@ -31,6 +31,11 @@
expect(q.getQuery()).toBe('select city_id, count(*) as total from human group by city_id, first_name');
});

it('joli.query.having()', function() {
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"');
});

it('joli.query.insertInto()', function() {
q = new joli.query().insertInto('human').values({
first_name: 'John',
Expand Down

0 comments on commit 96403d1

Please sign in to comment.