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
+2 -2
View File
@@ -59,7 +59,7 @@ test('destroy by staff', function() {
var user = Discourse.User.create({username: 'staff', staff: true});
var post = buildPost({user: user});
this.stub(Discourse, 'ajax').returns(new Em.Deferred());
sandbox.stub(Discourse, 'ajax').returns(new Em.Deferred());
post.destroy(user);
present(post.get('deleted_at'), "it has a `deleted_at` field.");
@@ -77,7 +77,7 @@ test('destroy by non-staff', function() {
var user = Discourse.User.create({username: 'evil trout'});
var post = buildPost({user: user, cooked: originalCooked});
this.stub(Discourse, 'ajax');
sandbox.stub(Discourse, 'ajax');
post.destroy(user);
ok(!post.get('can_delete'), "the post can't be deleted again in this session");