不要怂,就是干,撸起袖子干!

Commit d6608507 by Thomas Watson Steen

Add tests for Utils.format (currently failing)

1 parent b78ad765
Showing with 12 additions and 0 deletions
...@@ -112,4 +112,16 @@ describe('Utils', function() { ...@@ -112,4 +112,16 @@ describe('Utils', function() {
expect(Utils.isHash(values)).toBeTruthy(); expect(Utils.isHash(values)).toBeTruthy();
}); });
}); });
describe('format', function() {
it('should format where clause correctly when the value is truthy', function() {
var where = ['foo = ?', 1];
expect(Utils.format(where)).toEqual('foo = 1');
});
it('should format where clause correctly when the value is falsy', function() {
var where = ['foo = ?', 0];
expect(Utils.format(where)).toEqual('foo = 0');
});
});
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!