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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
e67759bb
Commit
e67759bb
authored
Apr 09, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix email handler spec for EE
parent
37a56324
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
spec/lib/gitlab/email/handler_spec.rb
spec/lib/gitlab/email/handler_spec.rb
+8
-2
No files found.
spec/lib/gitlab/email/handler_spec.rb
View file @
e67759bb
...
@@ -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
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