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
ff650a9b
Commit
ff650a9b
authored
May 19, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
May 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix leaky constant in merge request policy spec
parent
226bd0cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
.rubocop.yml
.rubocop.yml
+0
-1
changelogs/unreleased/leaky-constant-fix-15.yml
changelogs/unreleased/leaky-constant-fix-15.yml
+5
-0
spec/policies/merge_request_policy_spec.rb
spec/policies/merge_request_policy_spec.rb
+3
-3
No files found.
.rubocop.yml
View file @
ff650a9b
...
...
@@ -387,7 +387,6 @@ RSpec/LeakyConstantDeclaration:
-
'
spec/models/concerns/reactive_caching_spec.rb'
-
'
spec/models/concerns/triggerable_hooks_spec.rb'
-
'
spec/models/repository_spec.rb'
-
'
spec/policies/merge_request_policy_spec.rb'
-
'
spec/requests/api/graphql/tasks/task_completion_status_spec.rb'
-
'
spec/rubocop/cop/rspec/env_assignment_spec.rb'
-
'
spec/serializers/commit_entity_spec.rb'
...
...
changelogs/unreleased/leaky-constant-fix-15.yml
0 → 100644
View file @
ff650a9b
---
title
:
Fix leaky constant issue in merge request policy spec
merge_request
:
32044
author
:
Rajendra Kadam
type
:
fixed
spec/policies/merge_request_policy_spec.rb
View file @
ff650a9b
...
...
@@ -21,7 +21,7 @@ describe MergeRequestPolicy do
project
.
add_developer
(
developer
)
end
MR_PERMS
=
%i[create_merge_request_in
mr_perms
=
%i[create_merge_request_in
create_merge_request_from
read_merge_request
create_note]
.
freeze
...
...
@@ -29,7 +29,7 @@ describe MergeRequestPolicy do
shared_examples_for
'a denied user'
do
let
(
:perms
)
{
permissions
(
subject
,
merge_request
)
}
MR_PERMS
.
each
do
|
thing
|
mr_perms
.
each
do
|
thing
|
it
"cannot
#{
thing
}
"
do
expect
(
perms
).
to
be_disallowed
(
thing
)
end
...
...
@@ -39,7 +39,7 @@ describe MergeRequestPolicy do
shared_examples_for
'a user with access'
do
let
(
:perms
)
{
permissions
(
subject
,
merge_request
)
}
MR_PERMS
.
each
do
|
thing
|
mr_perms
.
each
do
|
thing
|
it
"can
#{
thing
}
"
do
expect
(
perms
).
to
be_allowed
(
thing
)
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