Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e11a793f
Commit
e11a793f
authored
Dec 06, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflict in spec/lib/gitlab/email/handler_spec.rb
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
c46ddd45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
spec/lib/gitlab/email/handler_spec.rb
spec/lib/gitlab/email/handler_spec.rb
+12
-14
No files found.
spec/lib/gitlab/email/handler_spec.rb
View file @
e11a793f
require
'spec_helper'
describe
Gitlab
::
Email
::
Handler
do
<<<<<<<
HEAD
before
do
stub_incoming_email_setting
(
enabled:
true
,
address:
"incoming+%{key}@appmail.adventuretime.ooo"
)
stub_config_setting
(
host:
'localhost'
)
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
end
def
handler_for
(
fixture
,
mail_key
)
described_class
.
for
(
fixture_file
(
fixture
),
mail_key
)
end
...
...
@@ -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
)
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment