Fix RSpec/DescribedClass
cop (#25104)
This commit is contained in:
parent
1e243e2df7
commit
c42591356d
66 changed files with 347 additions and 414 deletions
|
@ -7,7 +7,7 @@ RSpec.describe Follow do
|
|||
let(:bob) { Fabricate(:account, username: 'bob') }
|
||||
|
||||
describe 'validations' do
|
||||
subject { Follow.new(account: alice, target_account: bob, rate_limit: true) }
|
||||
subject { described_class.new(account: alice, target_account: bob, rate_limit: true) }
|
||||
|
||||
it 'is invalid without an account' do
|
||||
follow = Fabricate.build(:follow, account: nil)
|
||||
|
@ -38,10 +38,10 @@ RSpec.describe Follow do
|
|||
|
||||
describe 'recent' do
|
||||
it 'sorts so that more recent follows comes earlier' do
|
||||
follow0 = Follow.create!(account: alice, target_account: bob)
|
||||
follow1 = Follow.create!(account: bob, target_account: alice)
|
||||
follow0 = described_class.create!(account: alice, target_account: bob)
|
||||
follow1 = described_class.create!(account: bob, target_account: alice)
|
||||
|
||||
a = Follow.recent.to_a
|
||||
a = described_class.recent.to_a
|
||||
|
||||
expect(a.size).to eq 2
|
||||
expect(a[0]).to eq follow1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue