2013-03-27 13:04:29 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe NotificationsHelper do
|
2013-10-20 23:58:38 -04:00
|
|
|
describe 'notification_icon' do
|
2016-03-29 07:08:30 -04:00
|
|
|
it { expect(notification_icon(:disabled)).to match('class="fa fa-microphone-slash fa-fw"') }
|
|
|
|
it { expect(notification_icon(:participating)).to match('class="fa fa-volume-up fa-fw"') }
|
|
|
|
it { expect(notification_icon(:mention)).to match('class="fa fa-at fa-fw"') }
|
|
|
|
it { expect(notification_icon(:global)).to match('class="fa fa-globe fa-fw"') }
|
|
|
|
it { expect(notification_icon(:watch)).to match('class="fa fa-eye fa-fw"') }
|
|
|
|
end
|
2013-10-20 23:58:38 -04:00
|
|
|
|
2016-03-29 07:08:30 -04:00
|
|
|
describe 'notification_title' do
|
|
|
|
it { expect(notification_title(:watch)).to match('Watch') }
|
|
|
|
it { expect(notification_title(:mention)).to match('On mention') }
|
2017-06-07 16:13:44 -04:00
|
|
|
it { expect(notification_title(:global)).to match('Global') }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe '#notification_event_name' do
|
|
|
|
it { expect(notification_event_name(:success_pipeline)).to match('Successful pipeline') }
|
|
|
|
it { expect(notification_event_name(:failed_pipeline)).to match('Failed pipeline') }
|
2013-10-20 23:58:38 -04:00
|
|
|
end
|
2013-03-27 13:04:29 -04:00
|
|
|
end
|