parent
dc3aabb4f4
commit
76b24193c4
18 changed files with 31 additions and 82 deletions
|
@ -22,7 +22,7 @@ RSpec.describe Admin::ExportDomainBlocksController do
|
|||
Fabricate(:domain_block, domain: 'bad.domain', severity: 'silence', public_comment: 'bad server')
|
||||
Fabricate(:domain_block, domain: 'worse.domain', severity: 'suspend', reject_media: true, reject_reports: true, public_comment: 'worse server', obfuscate: true)
|
||||
Fabricate(:domain_block, domain: 'reject.media', severity: 'noop', reject_media: true, public_comment: 'reject media and test unicode characters ♥')
|
||||
Fabricate(:domain_block, domain: 'little.spam', severity: 'noop', public_comment: 'has some spams', reject_favourite: true, reject_reply: true, reject_straight_follow: true)
|
||||
Fabricate(:domain_block, domain: 'little.spam', severity: 'noop', public_comment: 'has some spams', reject_favourite: true, reject_straight_follow: true)
|
||||
Fabricate(:domain_block, domain: 'no.op', severity: 'noop', public_comment: 'noop')
|
||||
|
||||
get :export, params: { format: :csv }
|
||||
|
@ -48,11 +48,11 @@ RSpec.describe Admin::ExportDomainBlocksController do
|
|||
end
|
||||
|
||||
it 'renders page with extended domain blocks' do
|
||||
expect(assigns(:domain_blocks).map { |block| [block.domain, block.reject_favourite, block.reject_reply, block.reject_friend] }).to contain_exactly(
|
||||
['bad.domain', false, false, false],
|
||||
['worse.domain', false, false, false],
|
||||
['reject.media', false, false, false],
|
||||
['little.spam', true, true, false]
|
||||
expect(assigns(:domain_blocks).map { |block| [block.domain, block.reject_favourite, block.reject_friend] }).to contain_exactly(
|
||||
['bad.domain', false, false],
|
||||
['worse.domain', false, false],
|
||||
['reject.media', false, false],
|
||||
['little.spam', true, false]
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue