more white to allow renaming
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
defmodule FunCore.BasicSignupAllowlistTest do
|
||||
use ExUnit.Case
|
||||
import FunCore.BasicSignupAllowlist
|
||||
|
||||
test "addresses_as_list" do
|
||||
assert addresses_as_list("joe@example.com, jane@example.com") == [
|
||||
"joe@example.com",
|
||||
"jane@example.com"
|
||||
]
|
||||
end
|
||||
|
||||
test "jane in list" do
|
||||
lst = addresses_as_list("joe@example.com, jane@example.com")
|
||||
assert "jane@example.com" in lst
|
||||
end
|
||||
|
||||
describe "Not allowlisted when allowed list is" do
|
||||
test "not set" do
|
||||
refute(mail_allowlisted_fun(nil, "joe@example.com"))
|
||||
end
|
||||
|
||||
test "empty" do
|
||||
refute(mail_allowlisted_fun("j", "joe@example.com"))
|
||||
end
|
||||
end
|
||||
|
||||
describe "Whitelisted when" do
|
||||
test "*" do
|
||||
assert(mail_allowlisted_fun("*", "jane@example.com"))
|
||||
end
|
||||
|
||||
test "Multiple set and one match" do
|
||||
assert(mail_allowlisted_fun("joe@example.com, jane@example.com", "jane@example.com"))
|
||||
end
|
||||
|
||||
test "Matches with different casings" do
|
||||
assert(mail_allowlisted_fun("joe@Example.com, jane@example.com", "Joe@example.com"))
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user