Commit e67759bb authored by Michael Kozono's avatar Michael Kozono

Fix email handler spec for EE

parent 37a56324
...@@ -25,12 +25,12 @@ describe Gitlab::Email::Handler do ...@@ -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 ...@@ -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
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