FIX: Suspended users should have links stripped from their profiles.

This commit is contained in:
Robin Ward
2014-11-25 16:14:21 -05:00
parent 183c93904d
commit 4c9f55d1e1
2 changed files with 10 additions and 2 deletions

View File

@ -103,6 +103,14 @@ describe UserProfile do
expect(user_profile.bio_processed).to eq("<p>I love http://discourse.org</p>")
end
it 'removes the link if the user is suspended' do
user.suspended_till = 1.month.from_now
puts user.suspended?.inspect
user_profile.send(:cook)
expect(user_profile.bio_excerpt).to match_html("I love http://discourse.org")
expect(user_profile.bio_processed).to eq("<p>I love http://discourse.org</p>")
end
context 'tl3_links_no_follow is false' do
before { SiteSetting.stubs(:tl3_links_no_follow).returns(false) }