0
0
Fork 0

Autofix Rubocop RSpec/BeNil (#23653)

This commit is contained in:
Nick Schonning 2023-02-17 07:45:27 -05:00 committed by GitHub
parent 936204b9ea
commit 68b1071f86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 22 additions and 41 deletions

View file

@ -8,7 +8,7 @@ RSpec.describe AccountsController, type: :controller do
shared_examples 'cacheable response' do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do

View file

@ -10,7 +10,7 @@ RSpec.describe ActivityPub::CollectionsController, type: :controller do
shared_examples 'cacheable response' do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do

View file

@ -6,7 +6,7 @@ RSpec.describe ActivityPub::OutboxesController, type: :controller do
shared_examples 'cacheable response' do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do

View file

@ -11,7 +11,7 @@ RSpec.describe ActivityPub::RepliesController, type: :controller do
shared_examples 'cacheable response' do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do

View file

@ -28,7 +28,7 @@ RSpec.describe Api::V1::AppsController, type: :controller do
end
it 'creates an OAuth app' do
expect(Doorkeeper::Application.find_by(name: client_name)).to_not be nil
expect(Doorkeeper::Application.find_by(name: client_name)).to_not be_nil
end
it 'returns client ID and client secret' do

View file

@ -195,7 +195,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
end
it 'removes the status' do
expect(Status.find_by(id: status.id)).to be nil
expect(Status.find_by(id: status.id)).to be_nil
end
end

View file

@ -20,7 +20,7 @@ RSpec.describe InstanceActorsController, type: :controller do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do

View file

@ -8,7 +8,7 @@ describe StatusesController do
shared_examples 'cacheable response' do
it 'does not set cookies' do
expect(response.cookies).to be_empty
expect(response.headers['Set-Cookies']).to be nil
expect(response.headers['Set-Cookies']).to be_nil
end
it 'does not set sessions' do