mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: update 'posted' column on post owner change (#16367)
Fixes the issue where making a user x as owner of a post doesn't cause the concerned topic to be listed in new owner's `My Posts` top menu filter per https://meta.discourse.org/t/199369
This commit is contained in:
@@ -85,6 +85,11 @@ describe PostOwnerChanger do
|
||||
expect(p4.reload.user).to eq(user_a)
|
||||
end
|
||||
|
||||
it "sets 'posted' for TopicUser to true" do
|
||||
PostOwnerChanger.new(post_ids: [p1.id], topic_id: topic.id, new_owner: user_a, acting_user: editor).change_owner!
|
||||
expect(TopicUser.find_by(topic_id: topic.id, user_id: user_a.id).posted).to eq(true)
|
||||
end
|
||||
|
||||
context "sets topic notification level for the new owner" do
|
||||
let(:p4) { create_post(post_number: 2, topic: topic) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user