WIP
This commit is contained in:
parent
55171efbc4
commit
d711403674
2 changed files with 5 additions and 15 deletions
|
@ -114,7 +114,9 @@ describe InsertDuplicate do
|
|||
expect(result.attributes.with_indifferent_access).to eq(common_result_attributes.merge(
|
||||
{
|
||||
id: result.id,
|
||||
end_datetime: nil
|
||||
end_datetime: nil,
|
||||
banner_image: nil,
|
||||
campaign_template_id: nil
|
||||
}).with_indifferent_access)
|
||||
validate_cgo(result)
|
||||
end
|
||||
|
|
|
@ -46,20 +46,8 @@ describe SlugP2pCampaignNamingAlgorithm do
|
|||
expect(algo.create_copy_name(@name2)).to eq short_slug_copy_today_plus_1
|
||||
end
|
||||
|
||||
it 'errors when at max copies' do
|
||||
@name = short_slug
|
||||
@copy_base = copy_base
|
||||
campaign
|
||||
campaigns_at_max_copies
|
||||
|
||||
expect{ algo.create_copy_name(@name) }.to(raise_error{|error|
|
||||
expect(error).to be_a ArgumentError
|
||||
})
|
||||
campaigns_at_max_copies.each {|i|
|
||||
expect {algo.create_copy_name(i.slug)}.to(raise_error{|error|
|
||||
expect(error).to be_a ArgumentError
|
||||
})
|
||||
}
|
||||
it 'has 999 as the max_copies' do
|
||||
expect(algo.max_copies).to eq 999
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue