diff --git a/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/controller/GroupSessionControllerTest.kt b/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/controller/GroupSessionControllerTest.kt index 6ae5952..f47682f 100644 --- a/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/controller/GroupSessionControllerTest.kt +++ b/backend/src/test/kotlin/uk/co/neviyn/observationdatabase/controller/GroupSessionControllerTest.kt @@ -103,6 +103,7 @@ class GroupSessionControllerTest { controller.addGroupObservation(GroupObservation("A Student", listOf(scenario))) controller.pushObservationsToDatabase() verify(observationRepository, times(1)).save(any()) + verify(websocketMessenger, times(1)).convertAndSend("/ws/scenarios", mapOf("scenarios" to mapOf("Sample title" to listOf(scenario.copy(title = "A Student"))))) assertEquals(1, tutor.observations.size) } @@ -123,6 +124,7 @@ class GroupSessionControllerTest { controller.startGroupObservation(GroupObservationInit(1, TrainingType.INITIAL, listOf(1), listOf("Sample title"))) val rc = RatingComponent(rating = 5) controller.addGroupObservation(GroupObservation("A Student", listOf(Scenario(0, "Sample title", RatingComponent(rating = 0), rc, rc, rc, rc, rc, rc, rc)))) + verify(websocketMessenger, times(1)).convertAndSend("/ws/scenarios", mapOf("scenarios" to mapOf("Sample title" to listOf(Scenario(0, "A Student", RatingComponent(rating = 0), rc, rc, rc, rc, rc, rc, rc))))) controller.pushObservationsToDatabase() }