2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

add specs for post ownership change without revision

This commit is contained in:
Arpit Jalan 2016-08-20 00:57:12 +05:30
parent 03ce370d5e
commit 4a2f0e772c
3 changed files with 42 additions and 0 deletions

View file

@ -323,6 +323,20 @@ describe PostRevisor do
expect(post.revisions.size).to eq(1)
end
end
context 'passing skip_revision as true' do
before do
SiteSetting.stubs(:editing_grace_period).returns(1.minute.to_i)
subject.revise!(changed_by, { raw: 'yet another updated body' }, { revised_at: post.updated_at + 10.hours, skip_revision: true })
post.reload
end
it 'does not create new revision ' do
expect(post.version).to eq(2)
expect(post.public_version).to eq(2)
expect(post.revisions.size).to eq(1)
end
end
end
describe "topic excerpt" do