Skip to content

Commit

Permalink
added some tests for the new insertReplace() method
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierlacot committed Nov 15, 2013
1 parent 0d82715 commit c2ca38c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/lib/vendor/joli.js
Submodule joli.js updated 1 files
+20 −0 joli.js
8 changes: 8 additions & 0 deletions Resources/test/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
expect(q.getQuery()).toBe('insert into human (first_name, last_name) values (\'John\', \'Doe\')');
});

it('joli.query.insertReplace()', function() {
q = new joli.query().insertReplace('human').values({
first_name: 'John',
last_name: 'Doe'
});
expect(q.getQuery()).toBe('insert or replace into human (first_name, last_name) values (\'John\', \'Doe\')');
});

it('joli.query.join()', function() {
// check behavior with simple local id
q = new joli.query().select()
Expand Down

0 comments on commit c2ca38c

Please sign in to comment.