Gave up trying to reset env var - set to "*" after test

And after doctest. it stayed at "*" after the last test anyway, letting
the doctest fail.

doctests are not recommended for side effectful tests anyway https://hexdocs.pm/ex_unit/main/ExUnit.DocTest.html
This commit is contained in:
2025-09-14 21:30:08 +01:00
parent ca4eaf6f54
commit c848ca17ad
2 changed files with 20 additions and 21 deletions
+3
View File
@@ -21,6 +21,9 @@ defmodule BasicSignupWhitelist do
iex> System.delete_env("SIGNUP_ALLOWED_EMAILS")
iex> BasicSignupWhitelist.mail_whitelisted("joe@example.com")
false
iex> System.put_env("SIGNUP_ALLOWED_EMAILS","*")
iex> BasicSignupWhitelist.mail_whitelisted("joe@example.com")
true
"""
def mail_whitelisted(email) do