|
|
@ -10,7 +10,7 @@ describe Export do
|
|
|
|
|
|
|
|
|
|
|
|
describe 'to_csv' do
|
|
|
|
describe 'to_csv' do
|
|
|
|
it 'returns a csv of the blocked accounts' do
|
|
|
|
it 'returns a csv of the blocked accounts' do
|
|
|
|
target_accounts.each(&account.method(:block!))
|
|
|
|
target_accounts.each { |target_account| account.block!(target_account) }
|
|
|
|
|
|
|
|
|
|
|
|
export = Export.new(account).to_blocked_accounts_csv
|
|
|
|
export = Export.new(account).to_blocked_accounts_csv
|
|
|
|
results = export.strip.split
|
|
|
|
results = export.strip.split
|
|
|
@ -20,7 +20,7 @@ describe Export do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'returns a csv of the muted accounts' do
|
|
|
|
it 'returns a csv of the muted accounts' do
|
|
|
|
target_accounts.each(&account.method(:mute!))
|
|
|
|
target_accounts.each { |target_account| account.mute!(target_account) }
|
|
|
|
|
|
|
|
|
|
|
|
export = Export.new(account).to_muted_accounts_csv
|
|
|
|
export = Export.new(account).to_muted_accounts_csv
|
|
|
|
results = export.strip.split("\n")
|
|
|
|
results = export.strip.split("\n")
|
|
|
@ -31,7 +31,7 @@ describe Export do
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'returns a csv of the following accounts' do
|
|
|
|
it 'returns a csv of the following accounts' do
|
|
|
|
target_accounts.each(&account.method(:follow!))
|
|
|
|
target_accounts.each { |target_account| account.follow!(target_account) }
|
|
|
|
|
|
|
|
|
|
|
|
export = Export.new(account).to_following_accounts_csv
|
|
|
|
export = Export.new(account).to_following_accounts_csv
|
|
|
|
results = export.strip.split("\n")
|
|
|
|
results = export.strip.split("\n")
|
|
|
@ -51,17 +51,17 @@ describe Export do
|
|
|
|
|
|
|
|
|
|
|
|
describe 'total_follows' do
|
|
|
|
describe 'total_follows' do
|
|
|
|
it 'returns the total number of the followed accounts' do
|
|
|
|
it 'returns the total number of the followed accounts' do
|
|
|
|
target_accounts.each(&account.method(:follow!))
|
|
|
|
target_accounts.each { |target_account| account.follow!(target_account) }
|
|
|
|
expect(Export.new(account.reload).total_follows).to eq 2
|
|
|
|
expect(Export.new(account.reload).total_follows).to eq 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'returns the total number of the blocked accounts' do
|
|
|
|
it 'returns the total number of the blocked accounts' do
|
|
|
|
target_accounts.each(&account.method(:block!))
|
|
|
|
target_accounts.each { |target_account| account.block!(target_account) }
|
|
|
|
expect(Export.new(account.reload).total_blocks).to eq 2
|
|
|
|
expect(Export.new(account.reload).total_blocks).to eq 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
it 'returns the total number of the muted accounts' do
|
|
|
|
it 'returns the total number of the muted accounts' do
|
|
|
|
target_accounts.each(&account.method(:mute!))
|
|
|
|
target_accounts.each { |target_account| account.mute!(target_account) }
|
|
|
|
expect(Export.new(account.reload).total_mutes).to eq 2
|
|
|
|
expect(Export.new(account.reload).total_mutes).to eq 2
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|