0
0
Fork 0

Autofix Rubocop RSpec/LeadingSubject (#23670)

This commit is contained in:
Nick Schonning 2023-02-19 23:24:14 -05:00 committed by GitHub
parent 4ea1e0fceb
commit 4552685f6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 256 additions and 338 deletions

View file

@ -2,10 +2,10 @@ require 'rails_helper'
RSpec.describe Account::Field, type: :model do
describe '#verified?' do
let(:account) { double('Account', local?: true) }
subject { described_class.new(account, 'name' => 'Foo', 'value' => 'Bar', 'verified_at' => verified_at) }
let(:account) { double('Account', local?: true) }
context 'when verified_at is set' do
let(:verified_at) { Time.now.utc.iso8601 }
@ -24,11 +24,11 @@ RSpec.describe Account::Field, type: :model do
end
describe '#mark_verified!' do
subject { described_class.new(account, original_hash) }
let(:account) { double('Account', local?: true) }
let(:original_hash) { { 'name' => 'Foo', 'value' => 'Bar' } }
subject { described_class.new(account, original_hash) }
before do
subject.mark_verified!
end
@ -43,10 +43,10 @@ RSpec.describe Account::Field, type: :model do
end
describe '#verifiable?' do
let(:account) { double('Account', local?: local) }
subject { described_class.new(account, 'name' => 'Foo', 'value' => value) }
let(:account) { double('Account', local?: local) }
context 'for local accounts' do
let(:local) { true }