mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Disallow revision edits with empty raw content
This commit is contained in:
@@ -114,6 +114,15 @@ describe PostRevisor do
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with nil raw contents' do
|
||||
it "doesn't change version" do
|
||||
expect {
|
||||
expect(subject.revise!(post.user, raw: nil)).to eq(false)
|
||||
post.reload
|
||||
}.not_to change(post, :version)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'ninja editing' do
|
||||
it 'correctly applies edits' do
|
||||
SiteSetting.editing_grace_period = 1.minute
|
||||
|
||||
Reference in New Issue
Block a user