whitelist on exact match
This commit is contained in:
parent
f333ea1ed0
commit
b5e308aec6
@ -1,11 +1,15 @@
|
|||||||
defmodule FunCore.BasicSignupWhitelistTest do
|
defmodule FunCore.BasicSignupWhitelistTest do
|
||||||
use ExUnit.Case
|
use ExUnit.Case
|
||||||
|
|
||||||
def mail_whitelisted_fun(_signups_allowed, _email_received) do
|
def mail_whitelisted_fun(signups_allowed, email_received) do
|
||||||
false
|
signups_allowed == email_received
|
||||||
end
|
end
|
||||||
|
|
||||||
test "When not set, not whitelisted" do
|
test "When not set, not whitelisted" do
|
||||||
refute(mail_whitelisted_fun(nil, "joe@example.com"))
|
refute(mail_whitelisted_fun(nil, "joe@example.com"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "When set and mach, then whitelisted" do
|
||||||
|
assert(mail_whitelisted_fun("joe@example.com", "joe@example.com"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user