diff --git a/test/unit/builder.js b/test/unit/builder.js index b29c55233..b2f69fd88 100644 --- a/test/unit/builder.js +++ b/test/unit/builder.js @@ -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() {