Fix RSpec/DescribedClass
cop (#25104)
This commit is contained in:
parent
1e243e2df7
commit
c42591356d
66 changed files with 347 additions and 414 deletions
|
@ -12,7 +12,7 @@ describe Export do
|
|||
it 'returns a csv of the blocked accounts' do
|
||||
target_accounts.each { |target_account| account.block!(target_account) }
|
||||
|
||||
export = Export.new(account).to_blocked_accounts_csv
|
||||
export = described_class.new(account).to_blocked_accounts_csv
|
||||
results = export.strip.split
|
||||
|
||||
expect(results.size).to eq 2
|
||||
|
@ -22,7 +22,7 @@ describe Export do
|
|||
it 'returns a csv of the muted accounts' do
|
||||
target_accounts.each { |target_account| account.mute!(target_account) }
|
||||
|
||||
export = Export.new(account).to_muted_accounts_csv
|
||||
export = described_class.new(account).to_muted_accounts_csv
|
||||
results = export.strip.split("\n")
|
||||
|
||||
expect(results.size).to eq 3
|
||||
|
@ -33,7 +33,7 @@ describe Export do
|
|||
it 'returns a csv of the following accounts' do
|
||||
target_accounts.each { |target_account| account.follow!(target_account) }
|
||||
|
||||
export = Export.new(account).to_following_accounts_csv
|
||||
export = described_class.new(account).to_following_accounts_csv
|
||||
results = export.strip.split("\n")
|
||||
|
||||
expect(results.size).to eq 3
|
||||
|
@ -45,24 +45,24 @@ describe Export do
|
|||
describe 'total_storage' do
|
||||
it 'returns the total size of the media attachments' do
|
||||
media_attachment = Fabricate(:media_attachment, account: account)
|
||||
expect(Export.new(account).total_storage).to eq media_attachment.file_file_size || 0
|
||||
expect(described_class.new(account).total_storage).to eq media_attachment.file_file_size || 0
|
||||
end
|
||||
end
|
||||
|
||||
describe 'total_follows' do
|
||||
it 'returns the total number of the followed accounts' do
|
||||
target_accounts.each { |target_account| account.follow!(target_account) }
|
||||
expect(Export.new(account.reload).total_follows).to eq 2
|
||||
expect(described_class.new(account.reload).total_follows).to eq 2
|
||||
end
|
||||
|
||||
it 'returns the total number of the blocked accounts' do
|
||||
target_accounts.each { |target_account| account.block!(target_account) }
|
||||
expect(Export.new(account.reload).total_blocks).to eq 2
|
||||
expect(described_class.new(account.reload).total_blocks).to eq 2
|
||||
end
|
||||
|
||||
it 'returns the total number of the muted accounts' do
|
||||
target_accounts.each { |target_account| account.mute!(target_account) }
|
||||
expect(Export.new(account.reload).total_mutes).to eq 2
|
||||
expect(described_class.new(account.reload).total_mutes).to eq 2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue