Autofix Rubocop RSpec/ReturnFromStub (#23724)

This commit is contained in:
Nick Schonning
2023-02-19 20:32:10 -05:00
committed by GitHub
parent 21bf326356
commit a2fdb388eb
7 changed files with 6 additions and 19 deletions

View File

@ -86,7 +86,7 @@ describe Api::V1::Accounts::CredentialsController do
context 'without an oauth token' do
before do
allow(controller).to receive(:doorkeeper_token) { nil }
allow(controller).to receive(:doorkeeper_token).and_return(nil)
end
describe 'GET #show' do

View File

@ -30,7 +30,7 @@ describe Api::V1::Apps::CredentialsController do
context 'without an oauth token' do
before do
allow(controller).to receive(:doorkeeper_token) { nil }
allow(controller).to receive(:doorkeeper_token).and_return(nil)
end
describe 'GET #show' do

View File

@ -45,7 +45,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control
context 'without an oauth token' do
before do
allow(controller).to receive(:doorkeeper_token) { nil }
allow(controller).to receive(:doorkeeper_token).and_return(nil)
end
context 'with a private status' do

View File

@ -45,7 +45,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll
context 'without an oauth token' do
before do
allow(controller).to receive(:doorkeeper_token) { nil }
allow(controller).to receive(:doorkeeper_token).and_return(nil)
end
context 'with a private status' do

View File

@ -219,7 +219,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
context 'without an oauth token' do
before do
allow(controller).to receive(:doorkeeper_token) { nil }
allow(controller).to receive(:doorkeeper_token).and_return(nil)
end
context 'with a private status' do

View File

@ -8,7 +8,7 @@ RSpec.describe BlacklistedEmailValidator, type: :validator do
let(:errors) { double(add: nil) }
before do
allow(user).to receive(:valid_invitation?) { false }
allow(user).to receive(:valid_invitation?).and_return(false)
allow_any_instance_of(described_class).to receive(:blocked_email_provider?) { blocked_email }
end