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

Commit 01934f75 by Sascha Depold

a test for select queries

1 parent 15a5fc92
Showing with 10 additions and 0 deletions
...@@ -50,5 +50,15 @@ describe('Sequelize', function() { ...@@ -50,5 +50,15 @@ describe('Sequelize', function() {
done() done()
}) })
}) })
it('=>executes select queries correctly', function(done) {
var sql = "INSERT INTO " + this.User.tableName + " (username) VALUES ('john')"
this.sequelize.query(sql).success(function() {
this.sequelize.query("select * from " + this.User.tableName).success(function(users) {
expect(users.map(function(u){ return u.username })).toEqual(['john'])
done()
})
}.bind(this))
})
}) })
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!