mirror of
https://github.com/knex/knex.git
synced 2025-11-02 02:40:13 +00:00
Test for aggregate function with output name.
This commit is contained in:
parent
bbd50a6514
commit
91ce6d9121
@ -121,6 +121,15 @@ describe('Builder', function () {
|
||||
|
||||
});
|
||||
|
||||
|
||||
it('should call toString correctly on count() with output name', function() {
|
||||
|
||||
var output = "select count(`id`) as `count` from `users`";
|
||||
|
||||
expect(builder.from('users').count('id as count').toString()).to.equal(output);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('clone', function() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user