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, type: :model do
context do
let(:bob) { Fabricate(:account, username: 'bob') }
subject { Fabricate(:account) }
let(:bob) { Fabricate(:account, username: 'bob') }
describe '#suspend!' do
it 'marks the account as suspended' do
subject.suspend!
@ -87,14 +87,14 @@ RSpec.describe Account, type: :model do
end
describe 'Local domain user methods' do
subject { Fabricate(:account, domain: nil, username: 'alice') }
around do |example|
before = Rails.configuration.x.local_domain
example.run
Rails.configuration.x.local_domain = before
end
subject { Fabricate(:account, domain: nil, username: 'alice') }
describe '#to_webfinger_s' do
it 'returns a webfinger string for the account' do
Rails.configuration.x.local_domain = 'example.com'
@ -243,13 +243,13 @@ RSpec.describe Account, type: :model do
end
describe '#favourited?' do
subject { Fabricate(:account) }
let(:original_status) do
author = Fabricate(:account, username: 'original')
Fabricate(:status, account: author)
end
subject { Fabricate(:account) }
context 'when the status is a reblog of another status' do
let(:original_reblog) do
author = Fabricate(:account, username: 'original_reblogger')
@ -281,13 +281,13 @@ RSpec.describe Account, type: :model do
end
describe '#reblogged?' do
subject { Fabricate(:account) }
let(:original_status) do
author = Fabricate(:account, username: 'original')
Fabricate(:status, account: author)
end
subject { Fabricate(:account) }
context 'when the status is a reblog of another status' do
let(:original_reblog) do
author = Fabricate(:account, username: 'original_reblogger')