Commit e11a793f authored by Rémy Coutable's avatar Rémy Coutable

Resolve conflict in spec/lib/gitlab/email/handler_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent c46ddd45
require 'spec_helper' require 'spec_helper'
describe Gitlab::Email::Handler do describe Gitlab::Email::Handler do
<<<<<<< HEAD
before do before do
stub_incoming_email_setting(enabled: true, address: "incoming+%{key}@appmail.adventuretime.ooo") stub_incoming_email_setting(enabled: true, address: "incoming+%{key}@appmail.adventuretime.ooo")
stub_config_setting(host: 'localhost') stub_config_setting(host: 'localhost')
end end
describe '.for' do describe '.for' do
it 'picks issue handler if there is not merge request prefix' do
expect(described_class.for('email', 'project+key')).to be_an_instance_of(Gitlab::Email::Handler::CreateIssueHandler)
end
it 'picks merge request handler if there is merge request key' do
expect(described_class.for('email', 'project+merge-request+key')).to be_an_instance_of(Gitlab::Email::Handler::CreateMergeRequestHandler)
end
it 'returns nil if no handler is found' do
expect(described_class.for('email', '')).to be_nil
end
def handler_for(fixture, mail_key) def handler_for(fixture, mail_key)
described_class.for(fixture_file(fixture), mail_key) described_class.for(fixture_file(fixture), mail_key)
end end
...@@ -44,19 +55,6 @@ describe Gitlab::Email::Handler do ...@@ -44,19 +55,6 @@ describe Gitlab::Email::Handler do
expect(handler_for('emails/valid_new_issue.eml', 'some/project+auth_token')).to be_instance_of(Gitlab::Email::Handler::CreateIssueHandler) expect(handler_for('emails/valid_new_issue.eml', 'some/project+auth_token')).to be_instance_of(Gitlab::Email::Handler::CreateIssueHandler)
end end
=======
describe '.for' do
it 'picks issue handler if there is not merge request prefix' do
expect(described_class.for('email', 'project+key')).to be_an_instance_of(Gitlab::Email::Handler::CreateIssueHandler)
end
it 'picks merge request handler if there is merge request key' do
expect(described_class.for('email', 'project+merge-request+key')).to be_an_instance_of(Gitlab::Email::Handler::CreateMergeRequestHandler)
end
it 'returns nil if no handler is found' do
expect(described_class.for('email', '')).to be_nil
>>>>>>> upstream/master
end end
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