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
29db009e
Commit
29db009e
authored
Apr 26, 2021
by
Abdul Wadood
Committed by
Rémy Coutable
Apr 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses in ee/spec/support
parent
962a8a82
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
10 deletions
+14
-10
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-6
ee/changelogs/unreleased/rails-save-bang-ee-spec-support.yml
ee/changelogs/unreleased/rails-save-bang-ee-spec-support.yml
+5
-0
ee/spec/support/protected_tags/access_control_shared_examples.rb
.../support/protected_tags/access_control_shared_examples.rb
+1
-1
ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb
...ures/protected_branches_access_control_shared_examples.rb
+1
-1
ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb
.../finders/geo/framework_registry_finder_shared_examples.rb
+3
-0
ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb
...es/graphql/geo/geo_registries_resolver_shared_examples.rb
+2
-0
ee/spec/support/shared_examples/lib/analytics/common_merge_request_metrics_refresh_shared_examples.rb
...s/common_merge_request_metrics_refresh_shared_examples.rb
+2
-2
No files found.
.rubocop_manual_todo.yml
View file @
29db009e
...
...
@@ -126,12 +126,6 @@ Rails/SaveBang:
-
'
ee/spec/services/status_page/trigger_publish_service_spec.rb'
-
'
ee/spec/services/todo_service_spec.rb'
-
'
ee/spec/services/vulnerability_feedback/create_service_spec.rb'
-
'
ee/spec/support/protected_tags/access_control_shared_examples.rb'
-
'
ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb'
-
'
ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb'
-
'
ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb'
-
'
ee/spec/support/shared_examples/lib/analytics/common_merge_request_metrics_refresh_shared_examples.rb'
-
'
ee/spec/support/shared_examples/policies/protected_environments_shared_examples.rb'
-
'
qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb'
-
'
qa/qa/specs/features/browser_ui/3_create/repository/push_mirroring_lfs_over_http_spec.rb'
-
'
qa/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb'
...
...
ee/changelogs/unreleased/rails-save-bang-ee-spec-support.yml
0 → 100644
View file @
29db009e
---
title
:
Fix Rails/SaveBang rubocop offenses in ee/spec/support
merge_request
:
58074
author
:
Abdul Wadood @abdulwd
type
:
fixed
ee/spec/support/protected_tags/access_control_shared_examples.rb
View file @
29db009e
...
...
@@ -7,7 +7,7 @@ RSpec.shared_examples "protected tags > access control > EE" do
before
do
users
.
each
{
|
user
|
project
.
add_developer
(
user
)
}
groups
.
each
{
|
group
|
project
.
project_group_links
.
create
(
group:
group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
}
groups
.
each
{
|
group
|
project
.
project_group_links
.
create
!
(
group:
group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
}
end
def
access_levels
...
...
ee/spec/support/shared_examples/features/protected_branches_access_control_shared_examples.rb
View file @
29db009e
...
...
@@ -11,7 +11,7 @@ RSpec.shared_examples "protected branches > access control > EE" do
before
do
users
.
each
{
|
user
|
project
.
add_developer
(
user
)
}
groups
.
each
{
|
group
|
project
.
project_group_links
.
create
(
group:
group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
}
groups
.
each
{
|
group
|
project
.
project_group_links
.
create
(
group:
group
,
group_access:
Gitlab
::
Access
::
DEVELOPER
)
}
# rubocop:disable Rails/SaveBang
end
def
last_access_levels
(
git_operation
)
...
...
ee/spec/support/shared_examples/finders/geo/framework_registry_finder_shared_examples.rb
View file @
29db009e
...
...
@@ -3,9 +3,12 @@
RSpec
.
shared_examples
'a framework registry finder'
do
|
registry_factory
|
include
::
EE
::
GeoHelpers
# rubocop:disable Rails/SaveBang
let!
(
:registry1
)
{
create
(
registry_factory
)
}
let!
(
:registry2
)
{
create
(
registry_factory
)
}
let!
(
:registry3
)
{
create
(
registry_factory
)
}
# rubocop:enable Rails/SaveBang
let
(
:params
)
{
{}
}
subject
(
:registries
)
{
described_class
.
new
(
user
,
params
).
execute
}
...
...
ee/spec/support/shared_examples/graphql/geo/geo_registries_resolver_shared_examples.rb
View file @
29db009e
...
...
@@ -6,9 +6,11 @@ RSpec.shared_examples_for 'a Geo registries resolver' do |registry_factory_name|
describe
'#resolve'
do
let_it_be
(
:secondary
)
{
create
(
:geo_node
)
}
# rubocop:disable Rails/SaveBang
let_it_be
(
:registry1
)
{
create
(
registry_factory_name
)
}
let_it_be
(
:registry2
)
{
create
(
registry_factory_name
)
}
let_it_be
(
:registry3
)
{
create
(
registry_factory_name
)
}
# rubocop:enable Rails/SaveBang
let
(
:registries
)
{
[
registry1
,
registry2
,
registry3
]
}
let
(
:gql_context
)
{
{
current_user:
current_user
}
}
...
...
ee/spec/support/shared_examples/lib/analytics/common_merge_request_metrics_refresh_shared_examples.rb
View file @
29db009e
...
...
@@ -16,7 +16,7 @@ RSpec.shared_examples 'common merge request metric refresh for' do |metric_name|
context
"when
#{
metric_name
}
is already present"
do
before
do
merge_request
.
metrics
.
update
(
metric_name
=>
calculated_value
-
10
)
merge_request
.
metrics
.
update
!
(
metric_name
=>
calculated_value
-
10
)
end
it
"does not change
#{
metric_name
}
"
do
...
...
@@ -36,7 +36,7 @@ RSpec.shared_examples 'common merge request metric refresh for' do |metric_name|
context
'when no merge request metric is present'
do
before
do
merge_request
.
metrics
.
destroy
merge_request
.
metrics
.
destroy
!
merge_request
.
reload
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