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
baa4de47
Commit
baa4de47
authored
Aug 26, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shorten the name of variable in RSpec
parent
e13ac1be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ee/spec/presenters/merge_request_presenter_spec.rb
ee/spec/presenters/merge_request_presenter_spec.rb
+3
-3
No files found.
ee/spec/presenters/merge_request_presenter_spec.rb
View file @
baa4de47
...
@@ -114,13 +114,13 @@ RSpec.describe MergeRequestPresenter do
...
@@ -114,13 +114,13 @@ RSpec.describe MergeRequestPresenter do
subject
(
:missing_security_scan_types
)
{
presenter
.
missing_security_scan_types
}
subject
(
:missing_security_scan_types
)
{
presenter
.
missing_security_scan_types
}
before
do
before
do
stub_feature_flags
(
missing_mr_security_scan_types:
missing_mr_security_scan_types_
feature_enabled?
)
stub_feature_flags
(
missing_mr_security_scan_types:
feature_enabled?
)
allow
(
merge_request
).
to
receive
(
:actual_head_pipeline
).
and_return
(
pipeline
)
allow
(
merge_request
).
to
receive
(
:actual_head_pipeline
).
and_return
(
pipeline
)
allow
(
presenter
).
to
receive
(
:can?
).
with
(
user
,
:read_pipeline
,
pipeline
).
and_return
(
can_read_pipeline?
)
allow
(
presenter
).
to
receive
(
:can?
).
with
(
user
,
:read_pipeline
,
pipeline
).
and_return
(
can_read_pipeline?
)
end
end
context
'when the `missing_mr_security_scan_types` feature flag is not enabled'
do
context
'when the `missing_mr_security_scan_types` feature flag is not enabled'
do
let
(
:
missing_mr_security_scan_types_
feature_enabled?
)
{
false
}
let
(
:feature_enabled?
)
{
false
}
context
'when the `current_user` can not read the pipeline'
do
context
'when the `current_user` can not read the pipeline'
do
let
(
:can_read_pipeline?
)
{
false
}
let
(
:can_read_pipeline?
)
{
false
}
...
@@ -136,7 +136,7 @@ RSpec.describe MergeRequestPresenter do
...
@@ -136,7 +136,7 @@ RSpec.describe MergeRequestPresenter do
end
end
context
'when the `missing_mr_security_scan_types` feature flag is enabled'
do
context
'when the `missing_mr_security_scan_types` feature flag is enabled'
do
let
(
:
missing_mr_security_scan_types_
feature_enabled?
)
{
true
}
let
(
:feature_enabled?
)
{
true
}
context
'when the `current_user` can not read the pipeline'
do
context
'when the `current_user` can not read the pipeline'
do
let
(
:can_read_pipeline?
)
{
false
}
let
(
:can_read_pipeline?
)
{
false
}
...
...
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