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
c6d22b35
Commit
c6d22b35
authored
Sep 03, 2020
by
Rajendra Kadam
Committed by
Rémy Coutable
Sep 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses for spec/serializers/*
parent
7e0e3508
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
.rubocop_todo.yml
.rubocop_todo.yml
+0
-5
changelogs/unreleased/rails-save-bang-17.yml
changelogs/unreleased/rails-save-bang-17.yml
+5
-0
spec/serializers/environment_status_entity_spec.rb
spec/serializers/environment_status_entity_spec.rb
+1
-1
spec/serializers/issue_entity_spec.rb
spec/serializers/issue_entity_spec.rb
+1
-1
spec/serializers/job_entity_spec.rb
spec/serializers/job_entity_spec.rb
+2
-2
spec/serializers/merge_request_poll_widget_entity_spec.rb
spec/serializers/merge_request_poll_widget_entity_spec.rb
+1
-1
spec/serializers/merge_request_widget_entity_spec.rb
spec/serializers/merge_request_widget_entity_spec.rb
+2
-2
No files found.
.rubocop_todo.yml
View file @
c6d22b35
...
@@ -1208,11 +1208,6 @@ Rails/SaveBang:
...
@@ -1208,11 +1208,6 @@ Rails/SaveBang:
-
'
spec/requests/lfs_http_spec.rb'
-
'
spec/requests/lfs_http_spec.rb'
-
'
spec/requests/profiles/notifications_controller_spec.rb'
-
'
spec/requests/profiles/notifications_controller_spec.rb'
-
'
spec/requests/projects/cycle_analytics_events_spec.rb'
-
'
spec/requests/projects/cycle_analytics_events_spec.rb'
-
'
spec/serializers/environment_status_entity_spec.rb'
-
'
spec/serializers/issue_entity_spec.rb'
-
'
spec/serializers/job_entity_spec.rb'
-
'
spec/serializers/merge_request_poll_widget_entity_spec.rb'
-
'
spec/serializers/merge_request_widget_entity_spec.rb'
-
'
spec/services/auth/container_registry_authentication_service_spec.rb'
-
'
spec/services/auth/container_registry_authentication_service_spec.rb'
-
'
spec/services/auto_merge/base_service_spec.rb'
-
'
spec/services/auto_merge/base_service_spec.rb'
-
'
spec/services/auto_merge_service_spec.rb'
-
'
spec/services/auto_merge_service_spec.rb'
...
...
changelogs/unreleased/rails-save-bang-17.yml
0 → 100644
View file @
c6d22b35
---
title
:
Fix Rails/SaveBang offenses for spec/serializers/*
merge_request
:
41309
author
:
Rajendra Kadam
type
:
fixed
spec/serializers/environment_status_entity_spec.rb
View file @
c6d22b35
...
@@ -17,7 +17,7 @@ RSpec.describe EnvironmentStatusEntity do
...
@@ -17,7 +17,7 @@ RSpec.describe EnvironmentStatusEntity do
subject
{
entity
.
as_json
}
subject
{
entity
.
as_json
}
before
do
before
do
deployment
.
update
(
sha:
merge_request
.
diff_head_sha
)
deployment
.
update
!
(
sha:
merge_request
.
diff_head_sha
)
allow
(
request
).
to
receive
(
:current_user
).
and_return
(
user
)
allow
(
request
).
to
receive
(
:current_user
).
and_return
(
user
)
end
end
...
...
spec/serializers/issue_entity_spec.rb
View file @
c6d22b35
...
@@ -112,7 +112,7 @@ RSpec.describe IssueEntity do
...
@@ -112,7 +112,7 @@ RSpec.describe IssueEntity do
context
'when project is archived'
do
context
'when project is archived'
do
before
do
before
do
project
.
update
(
archived:
true
)
project
.
update
!
(
archived:
true
)
end
end
it
'returns archived true'
do
it
'returns archived true'
do
...
...
spec/serializers/job_entity_spec.rb
View file @
c6d22b35
...
@@ -45,7 +45,7 @@ RSpec.describe JobEntity do
...
@@ -45,7 +45,7 @@ RSpec.describe JobEntity do
context
'when job is retryable'
do
context
'when job is retryable'
do
before
do
before
do
job
.
update
(
status: :failed
)
job
.
update
!
(
status: :failed
)
end
end
it
'contains cancel path'
do
it
'contains cancel path'
do
...
@@ -55,7 +55,7 @@ RSpec.describe JobEntity do
...
@@ -55,7 +55,7 @@ RSpec.describe JobEntity do
context
'when job is cancelable'
do
context
'when job is cancelable'
do
before
do
before
do
job
.
update
(
status: :running
)
job
.
update
!
(
status: :running
)
end
end
it
'contains cancel path'
do
it
'contains cancel path'
do
...
...
spec/serializers/merge_request_poll_widget_entity_spec.rb
View file @
c6d22b35
...
@@ -265,7 +265,7 @@ RSpec.describe MergeRequestPollWidgetEntity do
...
@@ -265,7 +265,7 @@ RSpec.describe MergeRequestPollWidgetEntity do
context
'when is not up to date'
do
context
'when is not up to date'
do
it
'returns nil'
do
it
'returns nil'
do
pipeline
.
update
(
sha:
"not up to date"
)
pipeline
.
update
!
(
sha:
"not up to date"
)
expect
(
subject
[
:pipeline
]).
to
eq
(
nil
)
expect
(
subject
[
:pipeline
]).
to
eq
(
nil
)
end
end
...
...
spec/serializers/merge_request_widget_entity_spec.rb
View file @
c6d22b35
...
@@ -210,7 +210,7 @@ RSpec.describe MergeRequestWidgetEntity do
...
@@ -210,7 +210,7 @@ RSpec.describe MergeRequestWidgetEntity do
context
'when build feature is disabled'
do
context
'when build feature is disabled'
do
before
do
before
do
project
.
project_feature
.
update
(
builds_access_level:
ProjectFeature
::
DISABLED
)
project
.
project_feature
.
update
!
(
builds_access_level:
ProjectFeature
::
DISABLED
)
end
end
it
'has no path'
do
it
'has no path'
do
...
@@ -346,7 +346,7 @@ RSpec.describe MergeRequestWidgetEntity do
...
@@ -346,7 +346,7 @@ RSpec.describe MergeRequestWidgetEntity do
it
'returns a blank rebase_path'
do
it
'returns a blank rebase_path'
do
allow
(
merge_request
).
to
receive
(
:should_be_rebased?
).
and_return
(
true
)
allow
(
merge_request
).
to
receive
(
:should_be_rebased?
).
and_return
(
true
)
forked_project
.
destroy
forked_project
.
destroy
!
merge_request
.
reload
merge_request
.
reload
entity
=
described_class
.
new
(
merge_request
,
request:
request
).
as_json
entity
=
described_class
.
new
(
merge_request
,
request:
request
).
as_json
...
...
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