Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
80689309
Commit
80689309
authored
Jun 22, 2020
by
mo khan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace usage of `project.users.first` with `viewer`
parent
e47a8f3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ee/spec/controllers/projects/merge_requests_controller_spec.rb
...ec/controllers/projects/merge_requests_controller_spec.rb
+6
-6
No files found.
ee/spec/controllers/projects/merge_requests_controller_spec.rb
View file @
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
...
...
@@ -784,7 +784,7 @@ RSpec.describe Projects::MergeRequestsController do
before
do
allow_any_instance_of
(
::
MergeRequest
).
to
receive
(
:compare_reports
)
.
with
(
::
Ci
::
CompareLicenseScanningReportsService
,
project
.
users
.
first
).
and_return
(
comparison_status
)
.
with
(
::
Ci
::
CompareLicenseScanningReportsService
,
viewer
).
and_return
(
comparison_status
)
end
context
'when comparison is being processed'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment