diff options
Diffstat (limited to 'spec/views/projects/runners/_specific_runners.html.haml_spec.rb')
-rw-r--r-- | spec/views/projects/runners/_specific_runners.html.haml_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/views/projects/runners/_specific_runners.html.haml_spec.rb b/spec/views/projects/runners/_specific_runners.html.haml_spec.rb index ace3502dd1e..ce16e0d5ac6 100644 --- a/spec/views/projects/runners/_specific_runners.html.haml_spec.rb +++ b/spec/views/projects/runners/_specific_runners.html.haml_spec.rb @@ -11,12 +11,14 @@ RSpec.describe 'projects/runners/specific_runners.html.haml' do @project = project @assignable_runners = [] @project_runners = [] + allow(view).to receive(:current_user).and_return(user) allow(view).to receive(:reset_registration_token_namespace_project_settings_ci_cd_path).and_return('banana_url') end context 'when project runner registration is allowed' do before do stub_application_setting(valid_runner_registrars: ['project']) + allow(view).to receive(:can?).with(user, :register_project_runners, project).and_return(true) end it 'enables the Remove project button for a project' do @@ -32,7 +34,7 @@ RSpec.describe 'projects/runners/specific_runners.html.haml' do stub_application_setting(valid_runner_registrars: ['group']) end - it 'does not enable the the Remove project button for a project' do + it 'does not enable the Remove project button for a project' do render 'projects/runners/specific_runners', project: project expect(rendered).to have_content 'Please contact an admin to register runners.' |