summaryrefslogtreecommitdiff
path: root/spec/controllers/projects
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-01 07:27:36 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-01 07:27:36 +0000
commitde222caa576cab3d0894c65531f5822f205877d5 (patch)
treee66805f398cfb22196e0181bef90066a0fe1b674 /spec/controllers/projects
parent8a186dedfc1da12270ea77f2673b59fa08f770c1 (diff)
downloadgitlab-ce-de222caa576cab3d0894c65531f5822f205877d5.tar.gz
Add latest changes from gitlab-org/security/gitlab@15-0-stable-ee
Diffstat (limited to 'spec/controllers/projects')
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index 162c36f5069..f0fbbb65fa5 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -183,7 +183,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do
end
context 'with web terminal' do
- let(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline) }
+ let(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline, user: user) }
it 'exposes the terminal path' do
expect(response).to have_gitlab_http_status(:ok)
@@ -1285,7 +1285,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do
context 'when job exists' do
context 'and it has a terminal' do
- let!(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline) }
+ let!(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline, user: user) }
it 'has a job' do
get_terminal(id: job.id)
@@ -1296,7 +1296,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do
end
context 'and does not have a terminal' do
- let!(:job) { create(:ci_build, :running, pipeline: pipeline) }
+ let!(:job) { create(:ci_build, :running, pipeline: pipeline, user: user) }
it 'returns not_found' do
get_terminal(id: job.id)
@@ -1325,7 +1325,7 @@ RSpec.describe Projects::JobsController, :clean_gitlab_redis_shared_state do
end
describe 'GET #terminal_websocket_authorize' do
- let!(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline) }
+ let!(:job) { create(:ci_build, :running, :with_runner_session, pipeline: pipeline, user: user) }
before do
project.add_developer(user)