1
0
Fork 0
forked from gitea/nas

Update rubocop-rspec to version 3.6.0 (#34497)

This commit is contained in:
Matt Jankowski 2025-04-24 10:56:13 -04:00 committed by GitHub
parent 22ec828951
commit 6463415e06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 223 additions and 228 deletions

View file

@ -23,7 +23,7 @@ RSpec.describe ApplicationController do
end
end
shared_examples 'respond_with_error' do |code|
shared_examples 'error response' do |code|
it "returns http #{code} for http and renders template" do
subject
@ -51,7 +51,7 @@ RSpec.describe ApplicationController do
post 'success'
end
include_examples 'respond_with_error', 422
it_behaves_like 'error response', 422
end
describe 'helper_method :current_account' do
@ -123,7 +123,7 @@ RSpec.describe ApplicationController do
get 'routing_error'
end
include_examples 'respond_with_error', 404
it_behaves_like 'error response', 404
end
context 'with ActiveRecord::RecordNotFound' do
@ -132,7 +132,7 @@ RSpec.describe ApplicationController do
get 'record_not_found'
end
include_examples 'respond_with_error', 404
it_behaves_like 'error response', 404
end
context 'with ActionController::InvalidAuthenticityToken' do
@ -141,7 +141,7 @@ RSpec.describe ApplicationController do
get 'invalid_authenticity_token'
end
include_examples 'respond_with_error', 422
it_behaves_like 'error response', 422
end
describe 'before_action :check_suspension' do
@ -186,7 +186,7 @@ RSpec.describe ApplicationController do
get 'route_forbidden'
end
include_examples 'respond_with_error', 403
it_behaves_like 'error response', 403
end
describe 'not_found' do
@ -201,7 +201,7 @@ RSpec.describe ApplicationController do
get 'route_not_found'
end
include_examples 'respond_with_error', 404
it_behaves_like 'error response', 404
end
describe 'gone' do
@ -216,7 +216,7 @@ RSpec.describe ApplicationController do
get 'route_gone'
end
include_examples 'respond_with_error', 410
it_behaves_like 'error response', 410
end
describe 'unprocessable_entity' do
@ -231,6 +231,6 @@ RSpec.describe ApplicationController do
get 'route_unprocessable_entity'
end
include_examples 'respond_with_error', 422
it_behaves_like 'error response', 422
end
end