This commit is contained in:
Nanne Baars 2021-03-14 15:56:38 +01:00 committed by Nanne Baars
parent 8d2d82764f
commit 5a16ea514a
3 changed files with 8 additions and 8 deletions

View File

@ -210,7 +210,7 @@ public class JWTLessonTest extends IntegrationTest {
private void quiz() {
Map<String, Object> params = new HashMap<>();
params.put("question_0_solution", "Solution 1");
params.put("question_1_solution", "Solution 2");
params.put("question_1_solution", "Solution 3");
checkAssignment(url("/WebGoat/JWT/quiz"), params, true);
}

View File

@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class JWTQuiz extends AssignmentEndpoint {
private final String[] solutions = {"Solution 1", "Solution 2"};
private final String[] solutions = {"Solution 1", "Solution 3"};
private final boolean[] guesses = new boolean[solutions.length];
@PostMapping("/JWT/quiz")

View File

@ -3,17 +3,17 @@
{
"text": "What is the result of the first code snippet?",
"solutions": {
"1": "Throws an exception in line 13",
"2": "Invoked the method removeAllUsers at line 8",
"3": "Logs an error in line 10"
"1": "Throws an exception in line 12",
"2": "Invoked the method removeAllUsers at line 7",
"3": "Logs an error in line 9"
}
},
{
"text": "What is the result of the second code snippet?",
"solutions": {
"1": "Throws an exception in line 13",
"2": "Invoked the method removeAllUsers at line 8",
"3": "Logs an error in line 10"
"1": "Throws an exception in line 12",
"2": "Invoked the method removeAllUsers at line 7",
"3": "Logs an error in line 9"
}
}
]