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
d45850a6
Commit
d45850a6
authored
Apr 07, 2021
by
Huzaifa Iftikhar
Committed by
Luke Duncalfe
Apr 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang Rubocop offenses for commit models
parent
e6e204f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-2
changelogs/unreleased/issue-220040-fix-rails-savebang-commit-models.yml
...eleased/issue-220040-fix-rails-savebang-commit-models.yml
+5
-0
spec/models/commit_spec.rb
spec/models/commit_spec.rb
+1
-1
spec/models/commit_status_spec.rb
spec/models/commit_status_spec.rb
+3
-3
No files found.
.rubocop_manual_todo.yml
View file @
d45850a6
...
...
@@ -297,8 +297,6 @@ Rails/SaveBang:
-
'
spec/models/application_record_spec.rb'
-
'
spec/models/application_setting_spec.rb'
-
'
spec/models/clusters/applications/helm_spec.rb'
-
'
spec/models/commit_spec.rb'
-
'
spec/models/commit_status_spec.rb'
-
'
spec/models/container_repository_spec.rb'
-
'
spec/models/deploy_keys_project_spec.rb'
-
'
spec/models/deploy_token_spec.rb'
...
...
changelogs/unreleased/issue-220040-fix-rails-savebang-commit-models.yml
0 → 100644
View file @
d45850a6
---
title
:
Fix Rails/SaveBang Rubocop offenses for commit models
merge_request
:
58069
author
:
Huzaifa Iftikhar @huzaifaiftikhar
type
:
fixed
spec/models/commit_spec.rb
View file @
d45850a6
...
...
@@ -526,7 +526,7 @@ eos
context
'that is found'
do
before
do
# Artificially mark as completed.
merge_request
.
update
(
merge_commit_sha:
merge_commit
.
id
)
merge_request
.
update
!
(
merge_commit_sha:
merge_commit
.
id
)
end
it
do
...
...
spec/models/commit_status_spec.rb
View file @
d45850a6
...
...
@@ -213,12 +213,12 @@ RSpec.describe CommitStatus do
context
'when it is canceled'
do
before
do
commit_status
.
update
(
status:
'canceled'
)
commit_status
.
update
!
(
status:
'canceled'
)
end
context
'when there is auto_canceled_by'
do
before
do
commit_status
.
update
(
auto_canceled_by:
create
(
:ci_empty_pipeline
))
commit_status
.
update
!
(
auto_canceled_by:
create
(
:ci_empty_pipeline
))
end
it
'is auto canceled'
do
...
...
@@ -660,7 +660,7 @@ RSpec.describe CommitStatus do
end
it
"raise exception when trying to update"
do
expect
{
commit_status
.
save
}.
to
raise_error
(
ActiveRecord
::
StaleObjectError
)
expect
{
commit_status
.
save
!
}.
to
raise_error
(
ActiveRecord
::
StaleObjectError
)
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