fix(submissions): default to frontend search to prevent wrong 404 on hard refresh

This commit is contained in:
2026-10-16 01:55:38 +02:00
parent 13c09adff3
commit a6ea3719b9
3 changed files with 45 additions and 34 deletions
+20
View File
@@ -368,3 +368,23 @@ class ScopeAdminBroadcastTests(TestCase):
self.assertEqual(
sent, [{"id": str(self.scope.id), "is_active": False, "assigned": False}]
)
class SubmissionHomeViewTests(TestCase):
def setUp(self):
self.event = Event.objects.create(name="Event", path="event")
self.client.force_login(
CustomUser.objects.create_user(username="player", password="x")
)
def test_any_game_path_serves_the_app(self):
# Unknown game / no scope: the frontend shows its own not-found state
response = self.client.get(f"/{self.event.path}/submissions/unknown-game")
self.assertEqual(response.status_code, 200)
self.assertTemplateUsed(response, "app.html")
def test_unknown_event_is_404(self):
response = self.client.get("/nope/submissions/unknown-game")
self.assertEqual(response.status_code, 404)