diff options
Diffstat (limited to 'spec/models/integrations/base_chat_notification_spec.rb')
-rw-r--r-- | spec/models/integrations/base_chat_notification_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/integrations/base_chat_notification_spec.rb b/spec/models/integrations/base_chat_notification_spec.rb index 672d8de1e14..eb503e501d6 100644 --- a/spec/models/integrations/base_chat_notification_spec.rb +++ b/spec/models/integrations/base_chat_notification_spec.rb @@ -285,4 +285,22 @@ RSpec.describe Integrations::BaseChatNotification do expect { subject.webhook_placeholder }.to raise_error(NotImplementedError) end end + + describe '#event_channel_name' do + it 'returns the channel field name for the given event' do + expect(subject.event_channel_name(:event)).to eq('event_channel') + end + end + + describe '#event_channel_value' do + it 'returns the channel field value for the given event' do + subject.push_channel = '#pushes' + + expect(subject.event_channel_value(:push)).to eq('#pushes') + end + + it 'raises an error for unsupported events' do + expect { subject.event_channel_value(:foo) }.to raise_error(NoMethodError) + end + end end |