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:
Diffstat (limited to 'spec/lib/gitlab/slash_commands/presenters/access_spec.rb')
-rw-r--r--spec/lib/gitlab/slash_commands/presenters/access_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/slash_commands/presenters/access_spec.rb b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
index 3af0ae03256..d83871d67a2 100644
--- a/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
+++ b/spec/lib/gitlab/slash_commands/presenters/access_spec.rb
@@ -76,4 +76,19 @@ RSpec.describe Gitlab::SlashCommands::Presenters::Access do
end
end
end
+
+ describe '#confirm' do
+ let(:url) { 'https://example.com/api' }
+
+ subject { described_class.new.confirm(url) }
+
+ it { is_expected.to be_a(Hash) }
+
+ it 'tells the user to confirm the request' do
+ expect(subject[:response_type]).to be(:ephemeral)
+ expect(subject[:text]).to match(
+ "Please confirm the request by accessing <#{url}|this link> through a web browser"
+ )
+ end
+ end
end