FIX: UserProfileView: Do not log IP of logged-in users

This commit is contained in:
riking
2018-05-21 12:40:15 -07:00
committed by Sam
parent 7e8ef5d6e1
commit 501bc0e9af
3 changed files with 31 additions and 4 deletions

View File

@@ -34,6 +34,8 @@ RSpec.describe UserProfileView do
['1.1.1.1', '2.2.2.2'].each do |ip|
add(user_profile_id, ip, other_user.id, time)
expect(described_class.count).to eq(1)
# should not actually log IPs
expect(UserProfileView.where(user_id: other_user.id).count(:ip_address)).to eq(0)
end
end