Update copy to post-July-2026 reality and notify on signups
All checks were successful
Build and Deploy PunktFri / build-and-deploy (push) Successful in 1m20s

- Rewrite copy from "this will happen" to "this has happened": direct
  registration closed 1 July 2026, transition ends 30 June 2028
- Fix timeline (30 June 2028, not 1 July), update FAQ + JSON-LD, add FAQ
  on registering new domains now
- Send signup notification mail to henrik@i80.dk via smtp.i80.dk, with
  credentials from Consul KV
- Fix CI health check URL (punktfri.dk)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henrik Jess Nielsen
2026-09-19 06:52:45 +02:00
parent e453d140b5
commit 347bbb748b
9 changed files with 145 additions and 31 deletions

View File

@@ -90,3 +90,30 @@ def test_signup_duplicate_email(client):
r = client.post("/", data=data)
assert r.status_code == 200
assert "allerede" in r.data.decode("utf-8")
def test_signup_sends_notification(client, monkeypatch):
sent = []
monkeypatch.setattr(app_module, "SMTP_HOST", "smtp.example")
monkeypatch.setattr(app_module, "_send", sent.append)
monkeypatch.setattr(app_module.threading, "Thread",
lambda target, args, daemon: type("T", (), {"start": lambda self: target(*args)})())
client.post("/", data={
"navn": "Notif Test", "email": "notif@test.dk",
"domaener": "4", "egne_ns": "ja", "kommentar": "hej",
})
assert len(sent) == 1
msg = sent[0]
assert msg["To"] == "henrik@i80.dk"
assert msg["Reply-To"] == "notif@test.dk"
assert "Notif Test" in msg["Subject"]
assert "hej" in msg.get_content()
def test_signup_without_smtp_skips_notification(client, monkeypatch):
monkeypatch.setattr(app_module, "SMTP_HOST", "")
monkeypatch.setattr(app_module, "_send", lambda m: pytest.fail("should not send"))
r = client.post("/", data={
"navn": "X", "email": "nosmtp@test.dk", "domaener": "1", "egne_ns": "nej",
})
assert r.status_code == 302