Lots of work on tests

This commit is contained in:
Robin Ward
2014-07-30 18:56:01 -04:00
parent b6684e7168
commit 6f36d5996d
43 changed files with 248 additions and 311 deletions

View File

@ -32,7 +32,7 @@ test("save", function() {
controller = this.subject({ model: [badge, otherBadge] });
controller.send('selectBadge', badge);
sinon.stub(badge, "save").returns(Ember.RSVP.resolve({}));
sandbox.stub(badge, "save").returns(Ember.RSVP.resolve({}));
controller.send("save");
ok(badge.save.calledOnce, "called save on the badge");
});
@ -42,7 +42,7 @@ test("destroy", function() {
otherBadge = Discourse.Badge.create({id: 102, name: "Other Badge"}),
controller = this.subject({model: [badge, otherBadge]});
sinon.stub(badge, 'destroy').returns(Ember.RSVP.resolve({}));
sandbox.stub(badge, 'destroy').returns(Ember.RSVP.resolve({}));
bootbox.confirm = function(text, yes, no, func) {
func(false);