Skip to content

Commit

Permalink
participate test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTgl committed Feb 18, 2024
1 parent 2b510ce commit 8a5ace7
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,18 +115,16 @@ public void getQuizFormWithResult() {

@Test
@TestSecurity(user = "Prof", roles = { UserRole.PROF})
@JwtSecurity(claims = { @Claim(key = "email", value = "[email protected]") })
@JwtSecurity(claims = { @Claim(key = "sub", value = "111111111111111111111111") })
public void participateUniqueAlias() {
//create & get courses + ids
List<Course> 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")
Expand All @@ -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")
Expand Down

0 comments on commit 8a5ace7

Please sign in to comment.