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
086fd01d
Commit
086fd01d
authored
Sep 08, 2020
by
Rajendra Kadam
Committed by
Peter Leitzen
Sep 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rails/SaveBang offenses
Fixes Rails/SaveBang cop for spec files
parent
3c96d96d
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
.rubocop_todo.yml
.rubocop_todo.yml
+0
-3
changelogs/unreleased/rails-save-bang-29.yml
changelogs/unreleased/rails-save-bang-29.yml
+5
-0
spec/requests/git_http_spec.rb
spec/requests/git_http_spec.rb
+1
-1
spec/requests/lfs_http_spec.rb
spec/requests/lfs_http_spec.rb
+4
-4
spec/requests/profiles/notifications_controller_spec.rb
spec/requests/profiles/notifications_controller_spec.rb
+2
-2
No files found.
.rubocop_todo.yml
View file @
086fd01d
...
...
@@ -1136,9 +1136,6 @@ Rails/SaveBang:
-
'
spec/requests/api/notes_spec.rb'
-
'
spec/requests/api/pipeline_schedules_spec.rb'
-
'
spec/requests/api/project_import_spec.rb'
-
'
spec/requests/git_http_spec.rb'
-
'
spec/requests/lfs_http_spec.rb'
-
'
spec/requests/profiles/notifications_controller_spec.rb'
-
'
spec/requests/projects/cycle_analytics_events_spec.rb'
-
'
spec/services/auth/container_registry_authentication_service_spec.rb'
-
'
spec/services/auto_merge/base_service_spec.rb'
...
...
changelogs/unreleased/rails-save-bang-29.yml
0 → 100644
View file @
086fd01d
---
title
:
Fix Rails/SaveBang offenses for 3 files
merge_request
:
41392
author
:
Rajendra Kadam
type
:
other
spec/requests/git_http_spec.rb
View file @
086fd01d
...
...
@@ -763,7 +763,7 @@ RSpec.describe 'Git HTTP requests' do
context
'and build created by'
do
before
do
build
.
update
(
user:
user
)
build
.
update
!
(
user:
user
)
project
.
add_reporter
(
user
)
end
...
...
spec/requests/lfs_http_spec.rb
View file @
086fd01d
...
...
@@ -786,7 +786,7 @@ RSpec.describe 'Git LFS API and storage' do
let
(
:authorization
)
{
authorize_deploy_key
}
let
(
:update_user_permissions
)
do
project
.
deploy_keys_projects
.
create
(
deploy_key:
key
,
can_push:
true
)
project
.
deploy_keys_projects
.
create
!
(
deploy_key:
key
,
can_push:
true
)
end
it_behaves_like
'pushes new LFS objects'
,
renew_authorization:
false
...
...
@@ -991,7 +991,7 @@ RSpec.describe 'Git LFS API and storage' do
context
'and workhorse requests upload finalize for a new LFS object'
do
before
do
lfs_object
.
destroy
lfs_object
.
destroy
!
end
context
'with object storage disabled'
do
...
...
@@ -1009,7 +1009,7 @@ RSpec.describe 'Git LFS API and storage' do
end
let
(
:tmp_object
)
do
fog_connection
.
directories
.
new
(
key:
'lfs-objects'
).
files
.
create
(
fog_connection
.
directories
.
new
(
key:
'lfs-objects'
).
files
.
create
(
# rubocop: disable Rails/SaveBang
key:
'tmp/uploads/12312300'
,
body:
'content'
)
...
...
@@ -1080,7 +1080,7 @@ RSpec.describe 'Git LFS API and storage' do
context
'without the lfs object'
do
before
do
lfs_object
.
destroy
lfs_object
.
destroy
!
end
it
'rejects slashes in the tempfile name (path traversal)'
do
...
...
spec/requests/profiles/notifications_controller_spec.rb
View file @
086fd01d
...
...
@@ -5,8 +5,8 @@ require 'spec_helper'
RSpec
.
describe
'view user notifications'
do
let
(
:user
)
do
create
(
:user
)
do
|
user
|
user
.
emails
.
create
(
email:
'original@example.com'
,
confirmed_at:
Time
.
current
)
user
.
emails
.
create
(
email:
'new@example.com'
,
confirmed_at:
Time
.
current
)
user
.
emails
.
create
!
(
email:
'original@example.com'
,
confirmed_at:
Time
.
current
)
user
.
emails
.
create
!
(
email:
'new@example.com'
,
confirmed_at:
Time
.
current
)
user
.
notification_email
=
'original@example.com'
user
.
save!
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