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 bd4be5c3e..80857067b 100644 --- a/spec/helpers/track_helper_spec.rb +++ b/spec/helpers/track_helper_spec.rb @@ -31,6 +31,11 @@ describe TrackHelper do unsubscribe_notice(@track_thing).should == expected end + it 'should create a description of the track' do + expected = %Q(<a href="/search/Example%20Query/newest/advanced">anything matching text 'Example Query'</a>) + track_description(@track_thing).should == expected + end + end describe 'when displaying notices for a user track' do @@ -59,6 +64,11 @@ describe TrackHelper do unsubscribe_notice(@track_thing).should == expected end + it 'should create a description of the track' do + expected = %Q('#{user_link(@track_thing.tracked_user)}', a person) + track_description(@track_thing).should == expected + end + end describe 'when displaying notices for a public body track' do @@ -86,6 +96,11 @@ describe TrackHelper 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 + + it 'should create a description of the track' do + expected = %Q('#{public_body_link(@track_thing.public_body)}', a public authority) + track_description(@track_thing).should == expected + end end describe 'when displaying notices for a successful request track' do @@ -114,6 +129,10 @@ describe TrackHelper do unsubscribe_notice(@track_thing).should == expected end + it 'should create a description of the track' do + expected = %Q(<a href="/list/successful">successful requests</a>) + track_description(@track_thing).should == expected + end end describe 'when displaying notices for a new request track' do @@ -142,6 +161,11 @@ describe TrackHelper do unsubscribe_notice(@track_thing).should == expected end + it 'should create a description of the track' do + expected = %Q(<a href="/list">new requests</a>) + track_description(@track_thing).should == expected + end + end describe 'when displaying notices for a request update track' do @@ -170,6 +194,11 @@ describe TrackHelper do unsubscribe_notice(@track_thing).should == expected end + it 'should create a description of the track' do + expected = %Q('#{request_link(@track_thing.info_request)}', a request) + track_description(@track_thing).should == expected + end + end end |