refactor : count api uses where condition

This commit is contained in:
oof1lab
2017-11-19 17:12:56 +05:30
parent 46eef2b5f5
commit 8bb91180e7
3 changed files with 42 additions and 20 deletions

View File

@@ -1655,6 +1655,25 @@ describe('xmysql : tests', function () {
});
});
it('GET /api/payments/count?_where=(amount,gt,19000) should PASS', function (done) {
//post to an url with data
agent.get('/api/payments/count?_where=(amount,gt,19000)') //enter url
.expect(200)//200 for success 4xx for failure
.end(function (err, res) {
// Handle /api/v error
if (err) {
return done(err);
}
//validate response
res.body[0]['no_of_rows'].should.be.equals(196)
return done();
});
});
// it('GET /api/xjoin?_join=pl.productlines,_j,pr.products,_j,ord.orderDetails&_on1=(pl.productline,eq,pr.productline)&_on2=(pr.productcode,eq,ord.productcode) should PASS', function (done) {
//
// //post to an url with data