debian-mirror-gitlab/spec/helpers/broadcast_messages_helper_spec.rb

23 lines
603 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
require 'spec_helper'
describe BroadcastMessagesHelper do
describe 'broadcast_styling' do
2015-09-11 14:41:01 +05:30
let(:broadcast_message) { double(color: '', font: '') }
2014-09-02 18:07:02 +05:30
context "default style" do
it "should have no style" do
2015-09-11 14:41:01 +05:30
expect(broadcast_styling(broadcast_message)).to eq ''
2014-09-02 18:07:02 +05:30
end
end
2015-09-11 14:41:01 +05:30
context "customized style" do
let(:broadcast_message) { double(color: "#f2dede", font: '#b94a48') }
2014-09-02 18:07:02 +05:30
it "should have a customized style" do
2015-04-26 12:48:37 +05:30
expect(broadcast_styling(broadcast_message)).
2015-09-11 14:41:01 +05:30
to match('background-color: #f2dede; color: #b94a48')
2014-09-02 18:07:02 +05:30
end
end
end
end