Fix #3243: Don't create new note versions when nothing is changed.

This commit is contained in:
evazion
2017-07-28 17:41:05 -05:00
parent 76b4b365ae
commit 4b635628cc
2 changed files with 13 additions and 0 deletions

View File

@@ -153,6 +153,14 @@ class NoteTest < ActiveSupport::TestCase
assert_equal(["Post is note locked"], @note.errors.full_messages)
end
end
context "without making any changes" do
should "not create a new version" do
assert_no_difference("@note.versions.count") do
@note.save
end
end
end
end
context "when notes have been vandalized by one user" do