Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
52591f253b
commit
1c672bf967
4 changed files with 15 additions and 14 deletions
|
@ -67,8 +67,6 @@ Rails/SaveBang:
|
|||
- 'ee/spec/models/approval_merge_request_rule_spec.rb'
|
||||
- 'ee/spec/models/approval_project_rule_spec.rb'
|
||||
- 'ee/spec/models/burndown_spec.rb'
|
||||
- 'ee/spec/models/ci/pipeline_spec.rb'
|
||||
- 'ee/spec/models/ci/subscriptions/project_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'
|
||||
|
@ -354,8 +352,6 @@ Rails/SaveBang:
|
|||
- 'spec/requests/api/jobs_spec.rb'
|
||||
- 'spec/requests/api/labels_spec.rb'
|
||||
- 'spec/requests/api/project_import_spec.rb'
|
||||
- 'spec/requests/projects/cycle_analytics_events_spec.rb'
|
||||
- 'spec/requests/users_controller_spec.rb'
|
||||
|
||||
Rails/TimeZone:
|
||||
Enabled: true
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix Rails/SaveBang Rubocop offenses for requests module
|
||||
merge_request: 57883
|
||||
author: Huzaifa Iftikhar @huzaifaiftikhar
|
||||
type: fixed
|
|
@ -75,7 +75,7 @@ RSpec.describe 'value stream analytics events' do
|
|||
|
||||
context 'with private project and builds' do
|
||||
before do
|
||||
project.members.last.update(access_level: Gitlab::Access::GUEST)
|
||||
project.members.last.update!(access_level: Gitlab::Access::GUEST)
|
||||
end
|
||||
|
||||
it 'does not list the test events' do
|
||||
|
@ -100,7 +100,7 @@ RSpec.describe 'value stream analytics events' do
|
|||
|
||||
def create_cycle
|
||||
milestone = create(:milestone, project: project)
|
||||
issue.update(milestone: milestone)
|
||||
issue.update!(milestone: milestone)
|
||||
mr = create_merge_request_closing_issue(user, project, issue, commit_message: "References #{issue.to_reference}")
|
||||
|
||||
pipeline = create(:ci_empty_pipeline, status: 'created', project: project, ref: mr.source_branch, sha: mr.source_branch_sha, head_pipeline_of: mr)
|
||||
|
|
|
@ -663,7 +663,7 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
context 'when a user changed their username' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-username') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'old-username') }
|
||||
|
||||
it 'returns JSON indicating a user by that username does not exist' do
|
||||
get user_exists_url 'old-username'
|
||||
|
@ -705,7 +705,7 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
context 'when a user changed their username' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-username') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'old-username') }
|
||||
|
||||
it 'returns JSON indicating a user by that username does not exist' do
|
||||
get user_suggests_url 'old-username'
|
||||
|
@ -755,19 +755,19 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
context 'when requesting a redirected path' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-path') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'old-path') }
|
||||
|
||||
it_behaves_like 'redirects to the canonical path'
|
||||
|
||||
context 'when the old path is a substring of the scheme or host' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'http') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'http') }
|
||||
|
||||
# it does not modify the requested host and ...
|
||||
it_behaves_like 'redirects to the canonical path'
|
||||
end
|
||||
|
||||
context 'when the old path is substring of users' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'ser') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'ser') }
|
||||
|
||||
it_behaves_like 'redirects to the canonical path'
|
||||
end
|
||||
|
@ -806,19 +806,19 @@ RSpec.describe UsersController do
|
|||
end
|
||||
|
||||
context 'when requesting a redirected path' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'old-path') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'old-path') }
|
||||
|
||||
it_behaves_like 'redirects to the canonical path'
|
||||
|
||||
context 'when the old path is a substring of the scheme or host' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'http') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'http') }
|
||||
|
||||
# it does not modify the requested host and ...
|
||||
it_behaves_like 'redirects to the canonical path'
|
||||
end
|
||||
|
||||
context 'when the old path is substring of users' do
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create(path: 'ser') }
|
||||
let(:redirect_route) { user.namespace.redirect_routes.create!(path: 'ser') }
|
||||
|
||||
# it does not modify the /users part of the path
|
||||
# (i.e. /users/ser should not become /ufoos/ser) and ...
|
||||
|
|
Loading…
Reference in a new issue