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

Commit 00c856cd by Daniel Durante

Added another spec for multiple scope instances.

1 parent 11adc6f6
Showing with 19 additions and 0 deletions
...@@ -2190,6 +2190,25 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() { ...@@ -2190,6 +2190,25 @@ describe(Helpers.getTestDialectTeaser("DAOFactory"), function() {
done() done()
}) })
}) })
it("should be able to hold multiple scope objects", function(done) {
var sequelizeTeam = this.ScopeMe.scope('sequelizeTeam', 'orderScope')
, tobi = this.ScopeMe.scope({method: ['actualValue', 11]})
sequelizeTeam.all().success(function(team) {
tobi.all().success(function(t) {
expect(team).toBeArray()
expect(team.length).toEqual(2)
expect(team[0].username).toEqual('dan')
expect(team[1].username).toEqual('tony')
expect(t).toBeArray()
expect(t.length).toEqual(1)
expect(t[0].username).toEqual('tobi')
done()
})
})
})
}) })
describe('schematic support', function() { describe('schematic support', function() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!