gitlab-org--gitlab-foss/spec/helpers/broadcast_messages_helper_spec.rb
Jeroen van Baarsen 026e988544 Even more hound fixes
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 21:00:55 +01:00

22 lines
603 B
Ruby

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
expect(broadcast_styling(broadcast_message)).to match('')
end
end
context "customiezd style" do
before { broadcast_message.stub(color: "#f2dede", font: "#b94a48") }
it "should have a customized style" do
expect(broadcast_styling(broadcast_message)).
to match('background-color:#f2dede;color:#b94a48')
end
end
end
end