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:
authorNick Thomas <nick@gitlab.com>2018-09-03 14:06:26 +0300
committerNick Thomas <nick@gitlab.com>2018-09-03 14:06:26 +0300
commit0e05e3a0ff751868edf76c1a220b2154462eec6e (patch)
tree887d1e32afb07716306b07f5872ae50783a622b8 /spec/helpers
parent4ee68672e4078c339d93acaf414332ac7200774c (diff)
parent9dcbeca88955a02358b507730931e390dcfc63af (diff)
Merge branch 'fix-download-dropdown-link' into 'master'
Hide PAT creation advice for HTTP clone if PAT exists Closes #44111 See merge request gitlab-org/gitlab-ce!18208
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/button_helper_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/helpers/button_helper_spec.rb b/spec/helpers/button_helper_spec.rb
index 0c0a0003231..eebae1d7290 100644
--- a/spec/helpers/button_helper_spec.rb
+++ b/spec/helpers/button_helper_spec.rb
@@ -40,12 +40,24 @@ describe ButtonHelper do
end
context 'when user has no personal access tokens' do
- it 'has a personal access token text on the dropdown description ' do
+ it 'has a personal access token text on the dropdown description' do
description = element.search('.dropdown-menu-inner-content').first
expect(description.inner_text).to eq 'Create a personal access token on your account to pull or push via HTTP.'
end
end
+
+ context 'when user has personal access tokens' do
+ before do
+ create(:personal_access_token, user: user)
+ end
+
+ it 'does not have a personal access token text on the dropdown description' do
+ description = element.search('.dropdown-menu-inner-content').first
+
+ expect(description).to be_nil
+ end
+ end
end
context 'when user is ldap user' do