diff options
Diffstat (limited to 'spec/services/post_receive_service_spec.rb')
-rw-r--r-- | spec/services/post_receive_service_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/services/post_receive_service_spec.rb b/spec/services/post_receive_service_spec.rb index 9b9200fd33e..64b4a1125e8 100644 --- a/spec/services/post_receive_service_spec.rb +++ b/spec/services/post_receive_service_spec.rb @@ -130,14 +130,22 @@ describe PostReceiveService do end end - context 'broadcast message exists' do + context 'broadcast message banner exists' do it 'outputs a broadcast message' do - broadcast_message = create(:broadcast_message, starts_at: 1.day.ago, ends_at: 1.day.from_now) + broadcast_message = create(:broadcast_message) expect(subject).to include(build_alert_message(broadcast_message.message)) end end + context 'broadcast message notification exists' do + it 'does not output a broadcast message' do + create(:broadcast_message, :notification) + + expect(has_alert_messages?(subject)).to be_falsey + end + end + context 'broadcast message does not exist' do it 'does not output a broadcast message' do expect(has_alert_messages?(subject)).to be_falsey |