diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/views/layouts/header | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/views/layouts/header')
-rw-r--r-- | spec/views/layouts/header/_new_dropdown.haml_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/views/layouts/header/_new_dropdown.haml_spec.rb b/spec/views/layouts/header/_new_dropdown.haml_spec.rb index bf81ab577f7..319e7b55fc3 100644 --- a/spec/views/layouts/header/_new_dropdown.haml_spec.rb +++ b/spec/views/layouts/header/_new_dropdown.haml_spec.rb @@ -52,7 +52,6 @@ RSpec.describe 'layouts/header/_new_dropdown' do end it 'has a "New project" link' do - render('layouts/header/new_repo_experiment') render expect(rendered).to have_link('New project', href: new_project_path(namespace_id: group.id)) @@ -164,7 +163,6 @@ RSpec.describe 'layouts/header/_new_dropdown' do end it 'has a "New project" link' do - render('layouts/header/new_repo_experiment') render expect(rendered).to have_link('New project', href: new_project_path) @@ -182,13 +180,13 @@ RSpec.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 + context 'when the user is not allowed to do anything' 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) + it 'is nil' do + # We have to us `view.render` because `render` causes issues + # https://github.com/rails/rails/issues/41320 + expect(view.render("layouts/header/new_dropdown")).to be_nil end end end |