mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
Revert "Revert "REFACTOR: support booting discourse with DISCOURSE_NO_CONSTANTS""
This reverts commit c21457d6a7a369fb52dfd3cd01b3882055c85d62.
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
import FlaggedPost from 'admin/models/flagged-post';
|
||||
|
||||
module("Discourse.FlaggedPost");
|
||||
|
||||
test('delete first post', function() {
|
||||
sandbox.stub(Discourse, 'ajax');
|
||||
|
||||
Discourse.FlaggedPost.create({ id: 1, topic_id: 2, post_number: 1 })
|
||||
FlaggedPost.create({ id: 1, topic_id: 2, post_number: 1 })
|
||||
.deletePost();
|
||||
|
||||
ok(Discourse.ajax.calledWith("/t/2", { type: 'DELETE', cache: false }), "it deleted the topic");
|
||||
@ -12,7 +14,7 @@ test('delete first post', function() {
|
||||
test('delete second post', function() {
|
||||
sandbox.stub(Discourse, 'ajax');
|
||||
|
||||
Discourse.FlaggedPost.create({ id: 1, topic_id: 2, post_number: 2 })
|
||||
FlaggedPost.create({ id: 1, topic_id: 2, post_number: 2 })
|
||||
.deletePost();
|
||||
|
||||
ok(Discourse.ajax.calledWith("/posts/1", { type: 'DELETE', cache: false }), "it deleted the post");
|
||||
|
Reference in New Issue
Block a user