Skip to content

Commit

Permalink
Merge branch 'setup-tests'
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesbrandenburger committed Feb 18, 2024
2 parents 469c25b + d4a7ee2 commit 9f77b28
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,17 @@ public void getQuizFormWithResult() {
}

@Test
@TestSecurity(user = "Prof", roles = { UserRole.PROF})
@JwtSecurity(claims = { @Claim(key = "email", value = "[email protected]") })
@TestSecurity(user = "Student", roles = { UserRole.STUDENT})
@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 9f77b28

Please sign in to comment.