From 8a5ace71ba9189604fdac66e17a6269124225ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobi=20T=C3=B6gel?= <71888952+TobiTgl@users.noreply.github.com> Date: Sun, 18 Feb 2024 12:57:42 +0100 Subject: [PATCH] participate test fix --- .../mobilelearning/services/quiz/QuizFormServiceTest.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/src/test/java/de/htwg_konstanz/mobilelearning/services/quiz/QuizFormServiceTest.java b/backend/src/test/java/de/htwg_konstanz/mobilelearning/services/quiz/QuizFormServiceTest.java index 99fe12ce..81f6c664 100644 --- a/backend/src/test/java/de/htwg_konstanz/mobilelearning/services/quiz/QuizFormServiceTest.java +++ b/backend/src/test/java/de/htwg_konstanz/mobilelearning/services/quiz/QuizFormServiceTest.java @@ -115,18 +115,16 @@ public void getQuizFormWithResult() { @Test @TestSecurity(user = "Prof", roles = { UserRole.PROF}) - @JwtSecurity(claims = { @Claim(key = "email", value = "prof@htwg-konstanz.de") }) + @JwtSecurity(claims = { @Claim(key = "sub", value = "111111111111111111111111") }) public void participateUniqueAlias() { //create & get courses + ids List courses = createCourse(); String courseId = courses.getFirst().getId().toString(); String formId = courses.getFirst().getQuizForms().get(0).getId().toString(); createProfUser(); - String studentJwt = createStudentUser(); // Check successful RestResponse given() - .header("Authorization", "Bearer " + studentJwt) .pathParam("courseId", courseId) .pathParam("formId", formId) .body("alias") @@ -138,7 +136,6 @@ public void participateUniqueAlias() { // 409 if alias already taken given() - .header("Authorization", "Bearer " + studentJwt) .pathParam("courseId", courseId) .pathParam("formId", formId) .body("alias")