mail not whitelisted when not set
This commit is contained in:
parent
a913f2ca22
commit
135448398d
@ -4,15 +4,15 @@ defmodule BasicSignupWhitelist do
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
Hello world.
|
false
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
iex> BasicSignupWhitelist.hello()
|
iex> BasicSignupWhitelist.mail_whitelisted("joe@example.com")
|
||||||
:world
|
false
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def hello do
|
def mail_whitelisted(_email) do
|
||||||
:world
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -2,7 +2,7 @@ defmodule BasicSignupWhitelistTest do
|
|||||||
use ExUnit.Case
|
use ExUnit.Case
|
||||||
doctest BasicSignupWhitelist
|
doctest BasicSignupWhitelist
|
||||||
|
|
||||||
test "greets the world" do
|
test "When not set, not whitelisted" do
|
||||||
assert BasicSignupWhitelist.hello() == :world
|
assert BasicSignupWhitelist.mail_whitelisted("joe@example.com") == false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user