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
bab74f4f
Commit
bab74f4f
authored
Sep 21, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses
Fixes Rails/SaveBang cop for spec files in ee/spec/models/concerns/*
parent
0ced66ba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
7 deletions
+9
-7
.rubocop_todo.yml
.rubocop_todo.yml
+0
-3
changelogs/unreleased/rails-save-bang-35.yml
changelogs/unreleased/rails-save-bang-35.yml
+5
-0
ee/spec/models/concerns/approver_migrate_hook_spec.rb
ee/spec/models/concerns/approver_migrate_hook_spec.rb
+1
-1
ee/spec/models/concerns/deprecated_approvals_before_merge_spec.rb
...models/concerns/deprecated_approvals_before_merge_spec.rb
+2
-2
ee/spec/models/concerns/elastic/note_spec.rb
ee/spec/models/concerns/elastic/note_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
bab74f4f
...
...
@@ -703,9 +703,6 @@ Rails/SaveBang:
-
'
ee/spec/models/burndown_spec.rb'
-
'
ee/spec/models/ci/pipeline_spec.rb'
-
'
ee/spec/models/ci/subscriptions/project_spec.rb'
-
'
ee/spec/models/concerns/approver_migrate_hook_spec.rb'
-
'
ee/spec/models/concerns/deprecated_approvals_before_merge_spec.rb'
-
'
ee/spec/models/concerns/elastic/note_spec.rb'
-
'
ee/spec/models/ee/appearance_spec.rb'
-
'
ee/spec/models/ee/ci/job_artifact_spec.rb'
-
'
ee/spec/models/ee/protected_branch_spec.rb'
...
...
changelogs/unreleased/rails-save-bang-35.yml
0 → 100644
View file @
bab74f4f
---
title
:
Fixes Rails/SaveBang cop for spec files in ee/spec/models/concerns/*
merge_request
:
42839
author
:
Rajendra Kadam
type
:
other
ee/spec/models/concerns/approver_migrate_hook_spec.rb
View file @
bab74f4f
...
...
@@ -23,7 +23,7 @@ RSpec.describe ApproverMigrateHook do
end
context
'when rule already exists'
do
let!
(
:approval_rule
)
{
target
.
approval_rules
.
create
(
name:
'foo'
)
}
let!
(
:approval_rule
)
{
target
.
approval_rules
.
create
!
(
name:
'foo'
)
}
it
'reuses rule'
do
expect
do
...
...
ee/spec/models/concerns/deprecated_approvals_before_merge_spec.rb
View file @
bab74f4f
...
...
@@ -6,11 +6,11 @@ RSpec.describe DeprecatedApprovalsBeforeMerge do
shared_examples
'with approvals before merge deprecated'
do
context
'updating approvals_before_merge'
do
it
'creates any_approver rule'
do
subject
.
update
(
approvals_before_merge:
3
)
subject
.
update
!
(
approvals_before_merge:
3
)
expect_approvals_before_merge_to_be_updated
(
3
)
subject
.
update
(
approvals_before_merge:
5
)
subject
.
update
!
(
approvals_before_merge:
5
)
expect_approvals_before_merge_to_be_updated
(
5
)
end
...
...
ee/spec/models/concerns/elastic/note_spec.rb
View file @
bab74f4f
...
...
@@ -154,7 +154,7 @@ RSpec.describe Note, :elastic do
shared_examples
'notes finder'
do
|
user_type
,
no_of_notes
|
it
"finds
#{
no_of_notes
}
notes for
#{
user_type
}
"
,
:sidekiq_might_not_need_inline
do
superuser
=
create
(
user_type
)
superuser
=
create
(
user_type
)
# rubocop:disable Rails/SaveBang
issue
=
create
(
:issue
,
:confidential
,
author:
create
(
:user
))
Sidekiq
::
Testing
.
inline!
do
...
...
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