summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb
diff options
context:
space:
mode:
authorbikebilly <fabio@gitlab.com>2017-08-03 10:05:56 +0200
committerbikebilly <fabio@gitlab.com>2017-08-03 10:05:56 +0200
commit40dfddd4077da4d594bd9e8956e1fcb1c99434e6 (patch)
treed0761ed84471c22b3b0949720e3e0734e8645aac /spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb
parented5445388de13f1d126fec14cc0a9ea9ae03b397 (diff)
parentdc412b48693668f7fba3adea57b8be76685afa76 (diff)
downloadgitlab-ce-40dfddd4077da4d594bd9e8956e1fcb1c99434e6.tar.gz
Merge branch 'master' into 33329-tech-article-deploying-maven-artifacts
Diffstat (limited to 'spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb')
-rw-r--r--spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb b/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb
deleted file mode 100644
index dc2dd300072..00000000000
--- a/spec/lib/gitlab/chat_commands/presenters/deploy_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-require 'spec_helper'
-
-describe Gitlab::ChatCommands::Presenters::Deploy do
- let(:build) { create(:ci_build) }
-
- describe '#present' do
- subject { described_class.new(build).present('staging', 'prod') }
-
- it { is_expected.to have_key(:text) }
- it { is_expected.to have_key(:response_type) }
- it { is_expected.to have_key(:status) }
- it { is_expected.not_to have_key(:attachments) }
-
- it 'messages the channel of the deploy' do
- expect(subject[:response_type]).to be(:in_channel)
- expect(subject[:text]).to start_with("Deployment started from staging to prod")
- end
- end
-
- describe '#no_actions' do
- subject { described_class.new(nil).no_actions }
-
- it { is_expected.to have_key(:text) }
- it { is_expected.to have_key(:response_type) }
- it { is_expected.to have_key(:status) }
- it { is_expected.not_to have_key(:attachments) }
-
- it 'tells the user there is no action' do
- expect(subject[:response_type]).to be(:ephemeral)
- expect(subject[:text]).to eq("No action found to be executed")
- end
- end
-
- describe '#too_many_actions' do
- subject { described_class.new([]).too_many_actions }
-
- it { is_expected.to have_key(:text) }
- it { is_expected.to have_key(:response_type) }
- it { is_expected.to have_key(:status) }
- it { is_expected.not_to have_key(:attachments) }
-
- it 'tells the user there is no action' do
- expect(subject[:response_type]).to be(:ephemeral)
- expect(subject[:text]).to eq("Too many actions defined")
- end
- end
-end