models: stop saving IP addresses in version tables.

Mark various `creator_ip_addr` and `updater_ip_addr` columns as ignored
and stop updating them in preparation for dropping them.
This commit is contained in:
evazion
2022-09-18 03:02:30 -05:00
parent 44d4452068
commit d4da8499ce
28 changed files with 60 additions and 50 deletions

View File

@@ -5,12 +5,10 @@ class NoteTest < ActiveSupport::TestCase
setup do
@user = FactoryBot.create(:user)
CurrentUser.user = @user
CurrentUser.ip_addr = "127.0.0.1"
end
teardown do
CurrentUser.user = nil
CurrentUser.ip_addr = nil
end
context "#merge_version" do
@@ -77,7 +75,6 @@ class NoteTest < ActiveSupport::TestCase
assert_equal(1, @note.version)
assert_equal(1, @note.versions.first.version)
assert_equal(@user.id, @note.versions.first.updater_id)
assert_equal(CurrentUser.ip_addr, @note.versions.first.updater_ip_addr.to_s)
end
should "update the post's last_noted_at field" do
@@ -120,7 +117,6 @@ class NoteTest < ActiveSupport::TestCase
assert_equal("fafafa", @note.versions.last.body)
assert_equal(2, @note.version)
assert_equal(@user.id, @note.versions.last.updater_id)
assert_equal(CurrentUser.ip_addr, @note.versions.last.updater_ip_addr.to_s)
end
context "without making any changes" do