Skip to content

Commit

Permalink
add test that clearing offset (#2954)
Browse files Browse the repository at this point in the history
* add test that clearing offset

* fix typo
  • Loading branch information
HurSungYun authored and kibertoad committed Mar 5, 2019
1 parent f3f0750 commit 0db7859
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions test/unit/query/builder.js
Expand Up @@ -6800,6 +6800,33 @@ describe('QueryBuilder', function() {
);
});

it('should clear offset when passing null', function() {
testsql(
qb()
.from('test')
.offset(10)
.offset(null),
{
mysql: {
sql: 'select * from `test`',
bindings: [],
},
mssql: {
sql: 'select * from [test]',
bindings: [],
},
pg: {
sql: 'select * from "test"',
bindings: [],
},
'pg-redshift': {
sql: 'select * from "test"',
bindings: [],
},
}
);
});

it('allows passing builder into where clause, #162', function() {
var chain = qb()
.from('chapter')
Expand Down

0 comments on commit 0db7859

Please sign in to comment.