diff options
| author | Andrew Tomaka <atomaka@gmail.com> | 2013-12-09 00:34:51 -0500 |
|---|---|---|
| committer | Andrew Tomaka <atomaka@gmail.com> | 2013-12-18 17:43:45 -0500 |
| commit | 0760ba3efb7566b9f56bb066f4b15ba8ea34e1e7 (patch) | |
| tree | 90188fdd35e78469275a6f6084b33dce7495d841 /spec/helpers | |
| parent | 566b49624a230728a3a873ee1937f4b8d30ff8f5 (diff) | |
| download | gitlab-ce-0760ba3efb7566b9f56bb066f4b15ba8ea34e1e7.tar.gz | |
Customization and previewing of broadcast messages
Diffstat (limited to 'spec/helpers')
| -rw-r--r-- | spec/helpers/broadcast_messages_helper_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/helpers/broadcast_messages_helper_spec.rb b/spec/helpers/broadcast_messages_helper_spec.rb new file mode 100644 index 00000000000..1338ce4873d --- /dev/null +++ b/spec/helpers/broadcast_messages_helper_spec.rb @@ -0,0 +1,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 |
