diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-07 17:00:21 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-09 23:38:42 +0100 |
commit | 1da7d54ee549ffd54ce8f8df37caeee30badcce4 (patch) | |
tree | cc58a19ce8482e054479a50309ea8aaebcc0db20 /spec/gitlab_net_spec.rb | |
parent | 6d23be22d907ad8328169d36712ea36d36107b93 (diff) | |
download | gitlab-shell-1da7d54ee549ffd54ce8f8df37caeee30badcce4.tar.gz |
Print broadcast message if one is available.
Diffstat (limited to 'spec/gitlab_net_spec.rb')
-rw-r--r-- | spec/gitlab_net_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/gitlab_net_spec.rb b/spec/gitlab_net_spec.rb index d431ac7..5e6e4de 100644 --- a/spec/gitlab_net_spec.rb +++ b/spec/gitlab_net_spec.rb @@ -44,6 +44,26 @@ describe GitlabNet, vcr: true do end end + describe :broadcast_message do + context "broadcast message exists" do + it 'should return message' do + VCR.use_cassette("broadcast_message-ok") do + result = gitlab_net.broadcast_message + result["message"].should == "Message" + end + end + end + + context "broadcast message doesn't exist" do + it 'should return nil' do + VCR.use_cassette("broadcast_message-none") do + result = gitlab_net.broadcast_message + result.should == nil + end + end + end + end + describe :check_access do context 'ssh key with access to project' do it 'should allow pull access for dev.gitlab.org' do |