Fix RSpec/LetSetup
cop in spec/services (#28459)
This commit is contained in:
parent
efd16f3c2c
commit
9251779d75
14 changed files with 74 additions and 87 deletions
|
@ -271,14 +271,15 @@ RSpec.describe BulkImportService do
|
|||
let(:import_type) { 'domain_blocking' }
|
||||
let(:overwrite) { false }
|
||||
|
||||
let!(:rows) do
|
||||
let(:rows) do
|
||||
[
|
||||
{ 'domain' => 'blocked.com' },
|
||||
{ 'domain' => 'to_block.com' },
|
||||
].map { |data| import.rows.create!(data: data) }
|
||||
]
|
||||
end
|
||||
|
||||
before do
|
||||
rows.each { |data| import.rows.create!(data: data) }
|
||||
account.block_domain!('alreadyblocked.com')
|
||||
account.block_domain!('blocked.com')
|
||||
end
|
||||
|
@ -298,14 +299,15 @@ RSpec.describe BulkImportService do
|
|||
let(:import_type) { 'domain_blocking' }
|
||||
let(:overwrite) { true }
|
||||
|
||||
let!(:rows) do
|
||||
let(:rows) do
|
||||
[
|
||||
{ 'domain' => 'blocked.com' },
|
||||
{ 'domain' => 'to_block.com' },
|
||||
].map { |data| import.rows.create!(data: data) }
|
||||
]
|
||||
end
|
||||
|
||||
before do
|
||||
rows.each { |data| import.rows.create!(data: data) }
|
||||
account.block_domain!('alreadyblocked.com')
|
||||
account.block_domain!('blocked.com')
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue