rename environment variable

This commit is contained in:
Your Name
2025-09-16 09:03:12 +00:00
parent 926ff822ec
commit 30548eae80
2 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -3,21 +3,21 @@ defmodule BasicSignupWhitelistTest do
doctest BasicSignupWhitelist
defp allow_signups_for(whitelist) do
System.put_env("SIGNUP_ALLOWED_EMAILS", whitelist)
System.put_env("SIGNUP_ALLOWLIST_EMAILS", whitelist)
end
describe "setup in describe block" do
setup do
on_exit(fn ->
# resetting values did not work, so 'just' set it to the effect without this module configured.
System.put_env("SIGNUP_ALLOWED_EMAILS", "*")
System.put_env("SIGNUP_ALLOWLIST_EMAILS", "*")
end)
:ok
end
test "When not set, not whitelisted" do
System.delete_env("SIGNUP_ALLOWED_EMAILS")
System.delete_env("SIGNUP_ALLOWLIST_EMAILS")
refute BasicSignupWhitelist.mail_whitelisted("joe@example.com")
end