summaryrefslogtreecommitdiff
path: root/spec/helpers/broadcast_messages_helper_spec.rb
blob: 1338ce4873d61d0ff77d29402a688ce6c3c2b05e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'spec_helper'

describe BroadcastMessagesHelper do
  describe 'broadcast_styling' do
    let(:broadcast_message) { double(color: "", font: "") }

    context "default style" do
      it "should have no style" do
        broadcast_styling(broadcast_message).should match('')
      end
    end

    context "customiezd style" do
      before { broadcast_message.stub(color: "#f2dede", font: "#b94a48") }

      it "should have a customized style" do
        broadcast_styling(broadcast_message).should match('background-color:#f2dede;color:#b94a48')
      end
    end
  end
end