From 89bbc94331a341000cfc48ba331c27fb42eaa972 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Mon, 11 Jun 2018 18:42:31 +0200 Subject: [PATCH] Add spec for a26889a --- spec/services/user_anonymizer_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/services/user_anonymizer_spec.rb b/spec/services/user_anonymizer_spec.rb index aae23e8ee92..9212958d23c 100644 --- a/spec/services/user_anonymizer_spec.rb +++ b/spec/services/user_anonymizer_spec.rb @@ -251,6 +251,11 @@ describe UserAnonymizer do expect(post1.reload).to have_attributes(via_email: true, raw_email: nil) expect(post2.reload).to have_attributes(via_email: true, raw_email: "raw email from another user") end + + it "does not delete profile views" do + UserProfileView.add(user.id, '127.0.0.1', another_user.id, Time.now, true) + expect { make_anonymous }.to_not change { UserProfileView.count } + end end end