posts: remove rating, note, and status locks.
Remove the ability for users to lock ratings, note, and post statuses. Historically the majority of locked posts were from 10+ years ago when certain users habitually locked ratings and notes on every post they touched for no reason. Nowadays most posts have been unlocked. Only a handful of locked posts are left, none of which deserve to be locked. The is_rating_locked, is_note_locked, and is_status_locked columns still exist in the database, but aren't used.
This commit is contained in:
@@ -86,20 +86,6 @@ class NoteTest < ActiveSupport::TestCase
|
||||
@post.reload
|
||||
assert_not_nil(@post.last_noted_at)
|
||||
end
|
||||
|
||||
context "for a note-locked post" do
|
||||
setup do
|
||||
@post.update_attribute(:is_note_locked, true)
|
||||
end
|
||||
|
||||
should "fail" do
|
||||
assert_difference("Note.count", 0) do
|
||||
@note = FactoryBot.build(:note, :post => @post)
|
||||
@note.save
|
||||
end
|
||||
assert_equal(["Post is note locked"], @note.errors.full_messages)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "updating a note" do
|
||||
@@ -137,17 +123,6 @@ class NoteTest < ActiveSupport::TestCase
|
||||
assert_equal(CurrentUser.ip_addr, @note.versions.last.updater_ip_addr.to_s)
|
||||
end
|
||||
|
||||
context "for a note-locked post" do
|
||||
setup do
|
||||
@post.update_attribute(:is_note_locked, true)
|
||||
end
|
||||
|
||||
should "fail" do
|
||||
@note.update(x: 500)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user