mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 17:16:48 +00:00
refactor : count api uses where condition
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user