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
5092eff2
Commit
5092eff2
authored
Aug 18, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SaveBang cop for spec in spec/views/* and ee/spec/views/*
parent
beb7dfaf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
26 deletions
+10
-26
.rubocop_todo.yml
.rubocop_todo.yml
+0
-5
changelogs/unreleased/rails-save-bang-11.yml
changelogs/unreleased/rails-save-bang-11.yml
+5
-0
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
+1
-1
spec/views/notify/changed_milestone_email.html.haml_spec.rb
spec/views/notify/changed_milestone_email.html.haml_spec.rb
+1
-1
spec/views/projects/imports/new.html.haml_spec.rb
spec/views/projects/imports/new.html.haml_spec.rb
+1
-1
spec/views/projects/merge_requests/show.html.haml_spec.rb
spec/views/projects/merge_requests/show.html.haml_spec.rb
+1
-17
spec/views/shared/_label_row.html.haml_spec.rb
spec/views/shared/_label_row.html.haml_spec.rb
+1
-1
No files found.
.rubocop_todo.yml
View file @
5092eff2
...
...
@@ -877,7 +877,6 @@ Rails/SaveBang:
-
'
ee/spec/support/shared_examples/requests/api/project_approval_rules_api_shared_examples.rb'
-
'
ee/spec/support/shared_examples/services/build_execute_shared_examples.rb'
-
'
ee/spec/support/shared_examples/services/issue_epic_shared_examples.rb'
-
'
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb'
-
'
ee/spec/workers/adjourned_project_deletion_worker_spec.rb'
-
'
ee/spec/workers/clear_shared_runners_minutes_worker_spec.rb'
-
'
ee/spec/workers/create_github_webhook_worker_spec.rb'
...
...
@@ -1343,7 +1342,3 @@ Rails/SaveBang:
-
'
spec/tasks/gitlab/web_hook_rake_spec.rb'
-
'
spec/uploaders/file_uploader_spec.rb'
-
'
spec/uploaders/object_storage_spec.rb'
-
'
spec/views/notify/changed_milestone_email.html.haml_spec.rb'
-
'
spec/views/projects/imports/new.html.haml_spec.rb'
-
'
spec/views/projects/merge_requests/show.html.haml_spec.rb'
-
'
spec/views/shared/_label_row.html.haml_spec.rb'
changelogs/unreleased/rails-save-bang-11.yml
0 → 100644
View file @
5092eff2
---
title
:
Refactor spec/views/* and ee/spec/views/* to fix Rails/SaveBang Cop
merge_request
:
38981
author
:
Rajendra Kadam
type
:
fixed
ee/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb
View file @
5092eff2
...
...
@@ -30,7 +30,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do
before
do
stub_licensed_features
(
feature_flags:
true
)
project
.
project_feature
.
update
(
builds_access_level:
feature
)
project
.
project_feature
.
update
!
(
builds_access_level:
feature
)
project
.
team
.
add_developer
(
user
)
sign_in
(
user
)
...
...
spec/views/notify/changed_milestone_email.html.haml_spec.rb
View file @
5092eff2
...
...
@@ -22,7 +22,7 @@ RSpec.describe 'notify/changed_milestone_email.html.haml' do
context
'milestone with start and due dates'
do
before
do
milestone
.
update
(
start_date:
'2018-01-01'
,
due_date:
'2018-12-31'
)
milestone
.
update
!
(
start_date:
'2018-01-01'
,
due_date:
'2018-12-31'
)
end
it
'renders with date range'
do
...
...
spec/views/projects/imports/new.html.haml_spec.rb
View file @
5092eff2
...
...
@@ -9,7 +9,7 @@ RSpec.describe "projects/imports/new.html.haml" do
let
(
:project
)
{
create
(
:project_empty_repo
,
:import_failed
,
import_type: :gitlab_project
,
import_source:
'/var/opt/gitlab/gitlab-rails/shared/tmp/project_exports/uploads/t.tar.gz'
,
import_url:
nil
)
}
before
do
project
.
import_state
.
update
(
last_error:
'<a href="http://googl.com">Foo</a>'
)
project
.
import_state
.
update
!
(
last_error:
'<a href="http://googl.com">Foo</a>'
)
sign_in
(
user
)
project
.
add_maintainer
(
user
)
end
...
...
spec/views/projects/merge_requests/show.html.haml_spec.rb
View file @
5092eff2
...
...
@@ -12,7 +12,7 @@ RSpec.describe 'projects/merge_requests/show.html.haml' do
describe
'merge request assignee sidebar'
do
context
'when assignee is allowed to merge'
do
it
'does not show a warning icon'
do
closed_merge_request
.
update
(
assignee_id:
user
.
id
)
closed_merge_request
.
update
!
(
assignee_id:
user
.
id
)
project
.
add_maintainer
(
user
)
assign
(
:issuable_sidebar
,
serialize_issuable_sidebar
(
user
,
project
,
closed_merge_request
))
...
...
@@ -42,20 +42,4 @@ RSpec.describe 'projects/merge_requests/show.html.haml' do
expect
(
rendered
).
to
have_css
(
'a'
,
visible:
false
,
text:
'Close'
)
end
end
context
'when the merge request is open'
do
it
'closes the merge request if the source project does not exist'
do
closed_merge_request
.
update
(
state:
'open'
)
forked_project
.
destroy
# Reload merge request so MergeRequest#source_project turns to `nil`
closed_merge_request
.
reload
preload_view_requirements
render
expect
(
closed_merge_request
.
reload
.
state
).
to
eq
(
'closed'
)
expect
(
rendered
).
to
have_css
(
'a'
,
visible:
false
,
text:
'Reopen'
)
expect
(
rendered
).
to
have_css
(
'a'
,
visible:
false
,
text:
'Close'
)
end
end
end
spec/views/shared/_label_row.html.haml_spec.rb
View file @
5092eff2
...
...
@@ -9,7 +9,7 @@ RSpec.describe 'shared/_label_row.html.haml' do
label_types
.
each
do
|
label_type
,
label_factory
|
let!
(
:label
)
do
label_record
=
create
(
label_factory
)
label_record
=
create
(
label_factory
)
# rubocop: disable Rails/SaveBang
label_record
.
present
(
issuable_subject:
label_record
.
subject
)
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