updated .fa-ban icon to update via js & ws; changed taken_roles (or its cognates) everywhere to starter_roles, as 'taken' will be used in respect to roles thru-out entire game, not just this seat-determining phase of Role Select; patched up chosen cards not disappearing upon previous gamer choice, & a try,except that catches attempts to select one anyway w. a 409 & optimistic card rollback; new IT confirms this 409
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Disco DeDisco
2026-03-18 23:14:53 -04:00
parent 4f076165ef
commit 8c2a5d24ec
5 changed files with 51 additions and 18 deletions

View File

@@ -593,14 +593,20 @@ class SelectRoleViewTest(TestCase):
self.assertEqual(response.status_code, 302)
self.assertIn("/accounts/login/", response.url)
def test_select_role_redirects_to_room(self):
def test_select_role_returns_ok(self):
response = self.client.post(
reverse("epic:select_role", kwargs={"room_id": self.room.id}),
data={"role": "PC"},
)
self.assertRedirects(
response, reverse("epic:gatekeeper", args=[self.room.id])
self.assertEqual(response.status_code, 200)
def test_select_role_returns_409_for_duplicate_role(self):
TableSeat.objects.filter(room=self.room, slot_number=2).update(role="BC")
response = self.client.post(
reverse("epic:select_role", kwargs={"room_id": self.room.id}),
data={"role": "BC"},
)
self.assertEqual(response.status_code, 409)
class RevealPhaseRenderingTest(TestCase):