mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Show the entire history of replies above a post when you expend "in reply to"
This commit is contained in:
@@ -261,6 +261,22 @@ asyncTestDiscourse("loadIntoIdentityMap with post ids", function() {
|
||||
});
|
||||
});
|
||||
|
||||
asyncTestDiscourse("loading a post's history", function() {
|
||||
var postStream = buildStream(1234);
|
||||
expect(3);
|
||||
|
||||
var post = Discourse.Post.create({id: 4321});
|
||||
|
||||
var secondPost = Discourse.Post.create({id: 2222});
|
||||
|
||||
this.stub(Discourse, "ajax").returns(Ember.RSVP.resolve([secondPost]));
|
||||
postStream.findReplyHistory(post).then(function() {
|
||||
ok(Discourse.ajax.calledOnce, "it made the ajax request");
|
||||
present(postStream.findLoadedPost(2222), "it stores the returned post in the identity map");
|
||||
present(post.get('replyHistory'), "it sets the replyHistory attribute for the post");
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
test("staging and undoing a new post", function() {
|
||||
var postStream = buildStream(10101, [1]);
|
||||
|
||||
@@ -12,6 +12,7 @@ test('defaults', function() {
|
||||
var post = Discourse.Post.create({id: 1});
|
||||
blank(post.get('deleted_at'), "it has no deleted_at by default");
|
||||
blank(post.get('deleted_by'), "there is no deleted_by by default");
|
||||
equal(post.get('replyHistory.length'), 0, "there is no reply history by default");
|
||||
});
|
||||
|
||||
test('new_user', function() {
|
||||
|
||||
Reference in New Issue
Block a user