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

Commit b49f7c0c by Sascha Depold

Add test to make sure that array notation for where works

1 parent b4b0b9b7
Showing with 10 additions and 2 deletions
...@@ -85,6 +85,15 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -85,6 +85,15 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
}) })
}) })
it('treats questionmarks in an array', function(done) {
this.UserPrimary.find({
where: ['specialkey = ?', 'awesome']
}).on('sql', function(sql) {
expect(sql).to.contain("WHERE specialkey = 'awesome'")
done()
})
})
it('doesn\'t throw an error when entering in a non integer value for a specified primary field', function(done) { it('doesn\'t throw an error when entering in a non integer value for a specified primary field', function(done) {
this.UserPrimary.find('a string').success(function(user) { this.UserPrimary.find('a string').success(function(user) {
expect(user.specialkey).to.equal('a string') expect(user.specialkey).to.equal('a string')
...@@ -1015,4 +1024,4 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () { ...@@ -1015,4 +1024,4 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
}) })
}) })
}) })
}) })
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!