Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tomaka <atomaka@gmail.com>2013-12-09 09:34:51 +0400
committerAndrew Tomaka <atomaka@gmail.com>2013-12-19 02:43:45 +0400
commit0760ba3efb7566b9f56bb066f4b15ba8ea34e1e7 (patch)
tree90188fdd35e78469275a6f6084b33dce7495d841 /spec/helpers/broadcast_messages_helper_spec.rb
parent566b49624a230728a3a873ee1937f4b8d30ff8f5 (diff)
Customization and previewing of broadcast messages
Diffstat (limited to 'spec/helpers/broadcast_messages_helper_spec.rb')
-rw-r--r--spec/helpers/broadcast_messages_helper_spec.rb21
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