diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-29 21:06:13 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-29 21:06:13 +0000 |
commit | 839c080dd0976f19c274eee1331c47985490cd41 (patch) | |
tree | da3af62d5469f80c7555f9e8df11c18049e0334e /spec/features/snippets | |
parent | 8263f6ee3131cdea3c6041785c32771a6af0b24f (diff) | |
download | gitlab-ce-839c080dd0976f19c274eee1331c47985490cd41.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/snippets')
-rw-r--r-- | spec/features/snippets/show_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/snippets/show_spec.rb b/spec/features/snippets/show_spec.rb index edf7d37fd6d..450e520e293 100644 --- a/spec/features/snippets/show_spec.rb +++ b/spec/features/snippets/show_spec.rb @@ -158,4 +158,21 @@ describe 'Snippet', :js do subject { visit snippet_path(snippet) } end + + context 'when user cannot create snippets' do + let(:user) { create(:user, :external) } + let(:snippet) { create(:personal_snippet, :public) } + + before do + sign_in(user) + + visit snippet_path(snippet) + + wait_for_requests + end + + it 'does not show the "New Snippet" button' do + expect(page).not_to have_link('New snippet') + end + end end |