Commit 8c5b304e authored by Igor Drozdov's avatar Igor Drozdov

Merge branch 'nicolasdular/follow-up-product-marketing-email-errors' into 'master'

Use correct error for non-existing email track

See merge request gitlab-org/gitlab!58338
parents a3c410dc f8c00ca2
......@@ -27,7 +27,7 @@ module Namespaces
end
def execute
raise NotImplementedError, "Track #{track} not defined" unless TRACKS.key?(track)
raise ArgumentError, "Track #{track} not defined" unless TRACKS.key?(track)
groups_for_track.each_batch do |groups|
groups.each do |group|
......
......@@ -218,7 +218,7 @@ RSpec.describe Namespaces::InProductMarketingEmailsService, '#execute' do
stub_const("#{described_class}::TRACKS", { bar: :git_write })
end
it { expect { subject }.to raise_error(NotImplementedError, 'Track foo not defined') }
it { expect { subject }.to raise_error(ArgumentError, 'Track foo not defined') }
end
context 'when group is a sub-group' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment