Autofix Rubocop RSpec/LeadingSubject (#23670)
This commit is contained in:
parent
4ea1e0fceb
commit
4552685f6b
78 changed files with 256 additions and 338 deletions
|
@ -40,6 +40,8 @@ RSpec.describe PublicFeed, type: :model do
|
|||
end
|
||||
|
||||
context 'without local_only option' do
|
||||
subject { described_class.new(viewer).get(20).map(&:id) }
|
||||
|
||||
let(:viewer) { nil }
|
||||
|
||||
let!(:local_account) { Fabricate(:account, domain: nil) }
|
||||
|
@ -47,8 +49,6 @@ RSpec.describe PublicFeed, type: :model do
|
|||
let!(:local_status) { Fabricate(:status, account: local_account) }
|
||||
let!(:remote_status) { Fabricate(:status, account: remote_account) }
|
||||
|
||||
subject { described_class.new(viewer).get(20).map(&:id) }
|
||||
|
||||
context 'without a viewer' do
|
||||
let(:viewer) { nil }
|
||||
|
||||
|
@ -75,13 +75,13 @@ RSpec.describe PublicFeed, type: :model do
|
|||
end
|
||||
|
||||
context 'with a local_only option set' do
|
||||
subject { described_class.new(viewer, local: true).get(20).map(&:id) }
|
||||
|
||||
let!(:local_account) { Fabricate(:account, domain: nil) }
|
||||
let!(:remote_account) { Fabricate(:account, domain: 'test.com') }
|
||||
let!(:local_status) { Fabricate(:status, account: local_account) }
|
||||
let!(:remote_status) { Fabricate(:status, account: remote_account) }
|
||||
|
||||
subject { described_class.new(viewer, local: true).get(20).map(&:id) }
|
||||
|
||||
context 'without a viewer' do
|
||||
let(:viewer) { nil }
|
||||
|
||||
|
@ -108,13 +108,13 @@ RSpec.describe PublicFeed, type: :model do
|
|||
end
|
||||
|
||||
context 'with a remote_only option set' do
|
||||
subject { described_class.new(viewer, remote: true).get(20).map(&:id) }
|
||||
|
||||
let!(:local_account) { Fabricate(:account, domain: nil) }
|
||||
let!(:remote_account) { Fabricate(:account, domain: 'test.com') }
|
||||
let!(:local_status) { Fabricate(:status, account: local_account) }
|
||||
let!(:remote_status) { Fabricate(:status, account: remote_account) }
|
||||
|
||||
subject { described_class.new(viewer, remote: true).get(20).map(&:id) }
|
||||
|
||||
context 'without a viewer' do
|
||||
let(:viewer) { nil }
|
||||
|
||||
|
@ -135,12 +135,12 @@ RSpec.describe PublicFeed, type: :model do
|
|||
end
|
||||
|
||||
describe 'with an account passed in' do
|
||||
subject { described_class.new(@account).get(20).map(&:id) }
|
||||
|
||||
before do
|
||||
@account = Fabricate(:account)
|
||||
end
|
||||
|
||||
subject { described_class.new(@account).get(20).map(&:id) }
|
||||
|
||||
it 'excludes statuses from accounts blocked by the account' do
|
||||
blocked = Fabricate(:account)
|
||||
@account.block!(blocked)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue