Skip to content

Commit

Permalink
[Tests] Added test for data-grid.
Browse files Browse the repository at this point in the history
  • Loading branch information
nabil1337 committed Oct 18, 2013
1 parent ae8eea6 commit 7909ea6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/greppy/lib/helper/controller/data-gridTests.js
Expand Up @@ -92,7 +92,21 @@ describe('Data-Grid', function() {

describe('buildSqlCriteria', function() {


it('should build sql criteria for searching', function() {

var reqMockup = {
query: {}
};

var result = dg.buildSqlCriteria(reqMockup, {}, {});

result.view.should.equal('index');
result.limit.should.equal(25);
result.offset.should.equal(0);
result.page.should.equal(1);
result.pageSizes.should.eql([10, 25, 50, 100]);
result.where.should.equal('(deleted_at IS NULL)');
});
});
});

0 comments on commit 7909ea6

Please sign in to comment.