diff options
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/track_helper_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/helpers/track_helper_spec.rb b/spec/helpers/track_helper_spec.rb index d2c277993..bd4be5c3e 100644 --- a/spec/helpers/track_helper_spec.rb +++ b/spec/helpers/track_helper_spec.rb @@ -26,6 +26,11 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following <a href="/search/Example%20Query/newest/advanced">this search</a>) + unsubscribe_notice(@track_thing).should == expected + end + end describe 'when displaying notices for a user track' do @@ -49,6 +54,11 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following '#{user_link(@track_thing.tracked_user)}', a person) + unsubscribe_notice(@track_thing).should == expected + end + end describe 'when displaying notices for a public body track' do @@ -72,6 +82,10 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following '#{public_body_link(@track_thing.public_body)}', a public authority) + unsubscribe_notice(@track_thing).should == expected + end end describe 'when displaying notices for a successful request track' do @@ -95,6 +109,11 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following <a href="/list/successful">successful requests</a>) + unsubscribe_notice(@track_thing).should == expected + end + end describe 'when displaying notices for a new request track' do @@ -118,6 +137,11 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following <a href="/list">new requests</a>) + unsubscribe_notice(@track_thing).should == expected + end + end describe 'when displaying notices for a request update track' do @@ -141,6 +165,11 @@ describe TrackHelper do subscribe_follow_notice(@track_thing).should == expected end + it 'should create an unsubscribe notice' do + expected = %Q(You are no longer following '#{request_link(@track_thing.info_request)}', a request) + unsubscribe_notice(@track_thing).should == expected + end + end end |