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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user