mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: reorder participants in topic so always chronological
FEATURE: tie breaker for same number of posts is last post date UX: highlight for latest poster when it is OP
This commit is contained in:
@@ -291,7 +291,7 @@ describe PostDestroyer do
|
||||
let!(:post) { Fabricate(:post, raw: "Hello @CodingHorror") }
|
||||
|
||||
it "should feature the users again (in case they've changed)" do
|
||||
Jobs.expects(:enqueue).with(:feature_topic_users, has_entries(topic_id: post.topic_id, except_post_id: post.id))
|
||||
Jobs.expects(:enqueue).with(:feature_topic_users, has_entries(topic_id: post.topic_id))
|
||||
PostDestroyer.new(moderator, post).destroy
|
||||
end
|
||||
|
||||
|
||||
@@ -30,11 +30,6 @@ describe Jobs::FeatureTopicUsers do
|
||||
expect(topic.reload.featured_user_ids.include?(coding_horror.id)).to eq(true)
|
||||
end
|
||||
|
||||
it "will not feature the second poster if we supply their post to be ignored" do
|
||||
Jobs::FeatureTopicUsers.new.execute(topic_id: topic.id, except_post_id: second_post.id)
|
||||
expect(topic.reload.featured_user_ids.include?(coding_horror.id)).to eq(false)
|
||||
end
|
||||
|
||||
it "won't feature the last poster" do
|
||||
Jobs::FeatureTopicUsers.new.execute(topic_id: topic.id)
|
||||
expect(topic.reload.featured_user_ids.include?(evil_trout.id)).to eq(false)
|
||||
|
||||
Reference in New Issue
Block a user