diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-30 00:06:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-30 00:06:13 +0300 |
commit | 839c080dd0976f19c274eee1331c47985490cd41 (patch) | |
tree | da3af62d5469f80c7555f9e8df11c18049e0334e /spec/views/layouts | |
parent | 8263f6ee3131cdea3c6041785c32771a6af0b24f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/views/layouts')
-rw-r--r-- | spec/views/layouts/header/_new_dropdown.haml_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/views/layouts/header/_new_dropdown.haml_spec.rb b/spec/views/layouts/header/_new_dropdown.haml_spec.rb index 26e429ac5d0..1a04ffed103 100644 --- a/spec/views/layouts/header/_new_dropdown.haml_spec.rb +++ b/spec/views/layouts/header/_new_dropdown.haml_spec.rb @@ -126,6 +126,16 @@ describe 'layouts/header/_new_dropdown' do expect(rendered).to have_link('New snippet', href: new_snippet_path) end + + context 'when the user is not allowed to create snippets' do + let(:user) { create(:user, :external)} + + it 'has no "New snippet" link' do + render + + expect(rendered).not_to have_link('New snippet', href: new_snippet_path) + end + end end def stub_current_user(current_user) |