mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
add specs for post ownership change without revision
This commit is contained in:
@@ -51,6 +51,13 @@ describe PostOwnerChanger do
|
||||
expect(p2.user).not_to eq(user_a)
|
||||
end
|
||||
|
||||
it "skips creating new post revision if skip_revision is true" do
|
||||
described_class.new(post_ids: [p1.id, p2.id], topic_id: topic.id, new_owner: user_a, acting_user: editor, skip_revision: true).change_owner!
|
||||
p1.reload; p2.reload
|
||||
expect(p1.revisions.size).to eq(0)
|
||||
expect(p2.revisions.size).to eq(0)
|
||||
end
|
||||
|
||||
context "integration tests" do
|
||||
let(:p1user) { p1.user }
|
||||
let(:p2user) { p2.user }
|
||||
|
||||
Reference in New Issue
Block a user