refactor: rename mail_allowlisted to signup_allowed?

Follow Elixir naming conventions by using question mark suffix for boolean
functions. Renamed mail_allowlisted to signup_allowed? and mail_allowlisted_fun
to signup_allowed_fun throughout the codebase.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Your Name
2025-09-16 09:44:11 +00:00
co-authored by Claude
parent a89ed0c80c
commit 8112173ef4
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -18,12 +18,12 @@ defmodule BasicSignupAllowlistTest do
test "When not set, not allowlisted" do
System.delete_env(BasicSignupAllowlist.signup_allowlist_emails())
refute BasicSignupAllowlist.mail_allowlisted("joe@example.com")
refute BasicSignupAllowlist.signup_allowed?("joe@example.com")
end
test "When set to star, allowlisted" do
allow_signups_for("*")
assert BasicSignupAllowlist.mail_allowlisted("joe@example.com")
assert BasicSignupAllowlist.signup_allowed?("joe@example.com")
end
end
end
@@ -16,25 +16,25 @@ defmodule FunCore.BasicSignupAllowlistTest do
describe "Not allowlisted when allowed list is" do
test "not set" do
refute(mail_allowlisted_fun(nil, "joe@example.com"))
refute(signup_allowed_fun(nil, "joe@example.com"))
end
test "empty" do
refute(mail_allowlisted_fun("j", "joe@example.com"))
refute(signup_allowed_fun("j", "joe@example.com"))
end
end
describe "Allowlisted when" do
test "*" do
assert(mail_allowlisted_fun("*", "jane@example.com"))
assert(signup_allowed_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"))
assert(signup_allowed_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"))
assert(signup_allowed_fun("joe@Example.com, jane@example.com", "Joe@example.com"))
end
end
end