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:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 03:06:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-11 03:06:24 +0300
commit133924c6cc443f5f69e1ab08d43b363d77677cb0 (patch)
treee893a7d36105fc4acec7038feae5f03bd34cfc2c /spec/lib/gitlab/slash_commands
parentf607152a0802a68067343ad73f989033cb8e9a06 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/slash_commands')
-rw-r--r--spec/lib/gitlab/slash_commands/presenters/access_spec.rb22
1 files changed, 19 insertions, 3 deletions
diff --git a/spec/lib/gitlab/slash_commands/presenters/access_spec.rb b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
index f00039c634f..c7b83467660 100644
--- a/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
+++ b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
@@ -3,6 +3,13 @@
require 'spec_helper'
describe Gitlab::SlashCommands::Presenters::Access do
+ shared_examples_for 'displays an error message' do
+ it do
+ expect(subject[:text]).to match(error_message)
+ expect(subject[:response_type]).to be(:ephemeral)
+ end
+ end
+
describe '#access_denied' do
let(:project) { build(:project) }
@@ -10,9 +17,18 @@ describe Gitlab::SlashCommands::Presenters::Access do
it { is_expected.to be_a(Hash) }
- it 'displays an error message' do
- expect(subject[:text]).to match('are not allowed')
- expect(subject[:response_type]).to be(:ephemeral)
+ it_behaves_like 'displays an error message' do
+ let(:error_message) { 'you do not have access to the GitLab project' }
+ end
+ end
+
+ describe '#deactivated' do
+ subject { described_class.new.deactivated }
+
+ it { is_expected.to be_a(Hash) }
+
+ it_behaves_like 'displays an error message' do
+ let(:error_message) { 'your account has been deactivated by your administrator' }
end
end