Commit 603b113d authored by Dmytro Zaporozhets's avatar Dmytro Zaporozhets

Merge branch '208723-cleanup-specs' into 'master'

Replace usage of `project.users.first` with `viewer`

See merge request gitlab-org/gitlab!35045
parents 47650bec 80689309
......@@ -432,7 +432,7 @@ RSpec.describe Projects::MergeRequestsController do
before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareSecurityReportsService, project.users.first, 'dependency_scanning').and_return(comparison_status)
.with(::Ci::CompareSecurityReportsService, viewer, 'dependency_scanning').and_return(comparison_status)
end
context 'when comparison is being processed' do
......@@ -502,7 +502,7 @@ RSpec.describe Projects::MergeRequestsController do
before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareSecurityReportsService, project.users.first, 'container_scanning').and_return(comparison_status)
.with(::Ci::CompareSecurityReportsService, viewer, 'container_scanning').and_return(comparison_status)
end
context 'when comparison is being processed' do
......@@ -572,7 +572,7 @@ RSpec.describe Projects::MergeRequestsController do
before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareSecurityReportsService, project.users.first, 'sast').and_return(comparison_status)
.with(::Ci::CompareSecurityReportsService, viewer, 'sast').and_return(comparison_status)
end
context 'when comparison is being processed' do
......@@ -643,7 +643,7 @@ RSpec.describe Projects::MergeRequestsController do
before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareSecurityReportsService, project.users.first, 'secret_detection').and_return(comparison_status)
.with(::Ci::CompareSecurityReportsService, viewer, 'secret_detection').and_return(comparison_status)
end
context 'when comparison is being processed' do
......@@ -713,7 +713,7 @@ RSpec.describe Projects::MergeRequestsController do
before do
allow_any_instance_of(::MergeRequest).to receive(:compare_reports)
.with(::Ci::CompareSecurityReportsService, project.users.first, 'dast').and_return(comparison_status)
.with(::Ci::CompareSecurityReportsService, viewer, 'dast').and_return(comparison_status)
end
context 'when comparison is being processed' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment