Autofix Rubocop RSpec/ReturnFromStub (#23724)
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user