diff options
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/broadcast_messages_helper_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/helpers/broadcast_messages_helper_spec.rb b/spec/helpers/broadcast_messages_helper_spec.rb index 0fb8a7284f3..157cc4665a2 100644 --- a/spec/helpers/broadcast_messages_helper_spec.rb +++ b/spec/helpers/broadcast_messages_helper_spec.rb @@ -37,4 +37,24 @@ describe BroadcastMessagesHelper do to match('background-color: #f2dede; color: #b94a48') end end + + describe 'broadcast_message_status' do + it 'returns Active' do + message = build(:broadcast_message) + + expect(helper.broadcast_message_status(message)).to eq 'Active' + end + + it 'returns Expired' do + message = build(:broadcast_message, :expired) + + expect(helper.broadcast_message_status(message)).to eq 'Expired' + end + + it 'returns Pending' do + message = build(:broadcast_message, :future) + + expect(helper.broadcast_message_status(message)).to eq 'Pending' + end + end end |