more white to allow renaming

This commit is contained in:
Your Name
2025-09-16 09:32:40 +00:00
parent 6eab34c61a
commit 12ce7d1d5d
4 changed files with 143 additions and 146 deletions
@@ -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