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