Fix email handler spec for EE
This commit is contained in:
parent
37a5632483
commit
e67759bbc9
1 changed files with 8 additions and 2 deletions
|
@ -25,12 +25,12 @@ describe Gitlab::Email::Handler do
|
||||||
described_class.for('email', address).class
|
described_class.for('email', address).class
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(matched_handlers.uniq).to match_array(Gitlab::Email::Handler::HANDLERS)
|
expect(matched_handlers.uniq).to match_array(ce_handlers)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'can pick exactly one handler for each address' do
|
it 'can pick exactly one handler for each address' do
|
||||||
addresses.each do |address|
|
addresses.each do |address|
|
||||||
matched_handlers = Gitlab::Email::Handler::HANDLERS.select do |handler|
|
matched_handlers = ce_handlers.select do |handler|
|
||||||
handler.new('email', address).can_handle?
|
handler.new('email', address).can_handle?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -38,4 +38,10 @@ describe Gitlab::Email::Handler do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ce_handlers
|
||||||
|
@ce_handlers ||= Gitlab::Email::Handler::HANDLERS.reject do |handler|
|
||||||
|
handler.name.start_with?('Gitlab::Email::Handler::EE::')
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue