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
fe8f24a5
Commit
fe8f24a5
authored
Nov 04, 2021
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Permission is somehow cached. Don't add if we don't want
parent
d0d0b92c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
spec/controllers/projects/merge_requests/diffs_controller_spec.rb
...trollers/projects/merge_requests/diffs_controller_spec.rb
+4
-2
No files found.
spec/controllers/projects/merge_requests/diffs_controller_spec.rb
View file @
fe8f24a5
...
@@ -86,10 +86,11 @@ RSpec.describe Projects::MergeRequests::DiffsController do
...
@@ -86,10 +86,11 @@ RSpec.describe Projects::MergeRequests::DiffsController do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:maintainer
)
{
true
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
project
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
target_project:
project
,
source_project:
project
)
}
before
do
before
do
project
.
add_maintainer
(
user
)
project
.
add_maintainer
(
user
)
if
maintainer
sign_in
(
user
)
sign_in
(
user
)
end
end
...
@@ -383,8 +384,9 @@ RSpec.describe Projects::MergeRequests::DiffsController do
...
@@ -383,8 +384,9 @@ RSpec.describe Projects::MergeRequests::DiffsController do
end
end
context
'when the user cannot view the merge request'
do
context
'when the user cannot view the merge request'
do
let
(
:maintainer
)
{
false
}
before
do
before
do
project
.
team
.
truncate
diff_for_path
(
old_path:
existing_path
,
new_path:
existing_path
)
diff_for_path
(
old_path:
existing_path
,
new_path:
existing_path
)
end
end
...
...
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