2013-12-09 00:34:51 -05:00
|
|
|
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
|
2015-02-12 13:17:35 -05:00
|
|
|
expect(broadcast_styling(broadcast_message)).to match('')
|
2013-12-09 00:34:51 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context "customiezd style" do
|
|
|
|
before { broadcast_message.stub(color: "#f2dede", font: "#b94a48") }
|
|
|
|
|
|
|
|
it "should have a customized style" do
|
2015-02-12 13:53:23 -05:00
|
|
|
expect(broadcast_styling(broadcast_message)).
|
|
|
|
to match('background-color:#f2dede;color:#b94a48')
|
2013-12-09 00:34:51 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|