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
870aee0a
Commit
870aee0a
authored
Jul 21, 2020
by
alinamihaila
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return boolean value for enabled? and supports_wildcard?
parent
c4079d30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
lib/gitlab/incoming_email.rb
lib/gitlab/incoming_email.rb
+2
-2
spec/lib/gitlab/incoming_email_spec.rb
spec/lib/gitlab/incoming_email_spec.rb
+5
-5
No files found.
lib/gitlab/incoming_email.rb
View file @
870aee0a
...
...
@@ -8,11 +8,11 @@ module Gitlab
class
<<
self
def
enabled?
config
.
enabled
&&
config
.
address
config
.
enabled
&&
config
.
address
.
present?
end
def
supports_wildcard?
config
.
address
&&
config
.
address
.
include?
(
WILDCARD_PLACEHOLDER
)
config
.
address
.
present?
&&
config
.
address
.
include?
(
WILDCARD_PLACEHOLDER
)
end
def
supports_issue_creation?
...
...
spec/lib/gitlab/incoming_email_spec.rb
View file @
870aee0a
...
...
@@ -10,7 +10,7 @@ RSpec.describe Gitlab::IncomingEmail do
end
it
'returns true'
do
expect
(
described_class
.
enabled?
).
to
be
_truthy
expect
(
described_class
.
enabled?
).
to
be
(
true
)
end
end
...
...
@@ -20,7 +20,7 @@ RSpec.describe Gitlab::IncomingEmail do
end
it
"returns false"
do
expect
(
described_class
.
enabled?
).
to
be
_falsey
expect
(
described_class
.
enabled?
).
to
be
(
false
)
end
end
end
...
...
@@ -32,7 +32,7 @@ RSpec.describe Gitlab::IncomingEmail do
end
it
'confirms that wildcard is supported'
do
expect
(
described_class
.
supports_wildcard?
).
to
be
_truthy
expect
(
described_class
.
supports_wildcard?
).
to
be
(
true
)
end
end
...
...
@@ -42,7 +42,7 @@ RSpec.describe Gitlab::IncomingEmail do
end
it
'returns that wildcard is not supported'
do
expect
(
described_class
.
supports_wildcard?
).
to
be
_falsey
expect
(
described_class
.
supports_wildcard?
).
to
be
(
false
)
end
end
...
...
@@ -52,7 +52,7 @@ RSpec.describe Gitlab::IncomingEmail do
end
it
'returns that wildcard is not supported'
do
expect
(
described_class
.
supports_wildcard?
).
to
be
_falsey
expect
(
described_class
.
supports_wildcard?
).
to
be
(
false
)
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