Commit 870aee0a authored by alinamihaila's avatar alinamihaila

Return boolean value for enabled? and supports_wildcard?

parent c4079d30
......@@ -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?
......
......@@ -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
......
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