kin: BATON-BIZ-002 Убрать hardcoded VAPID key из meta-тега, читать с /api/push/public-key

This commit is contained in:
Gros Frumos 2026-03-21 12:43:35 +02:00
parent ea06309a6e
commit 6444b30d17
7 changed files with 488 additions and 159 deletions

View file

@ -78,10 +78,10 @@ def test_app_js_contains_fetch_vapid_public_key_function() -> None:
def test_app_js_fetch_vapid_calls_api_endpoint() -> None:
"""_fetchVapidPublicKey в app.js должна обращаться к /api/vapid-public-key."""
"""_fetchVapidPublicKey в app.js должна обращаться к /api/push/public-key (canonical URL)."""
content = APP_JS.read_text(encoding="utf-8")
assert "/api/vapid-public-key" in content, (
"app.js не содержит URL '/api/vapid-public-key' — VAPID ключ не читается через API"
assert "/api/push/public-key" in content, (
"app.js не содержит URL '/api/push/public-key' — VAPID ключ не читается через API"
)