chore: add test for solving same lesson as different user. (#1930)

We removed the constraint but did not add an extra testcase to cover this bug.

Closes: #1890
This commit is contained in:
Nanne Baars 2024-10-26 12:06:30 +02:00 committed by GitHub
parent ec97568ec2
commit d08a56d351
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,16 @@ public class GeneralLessonIntegrationTest extends IntegrationTest {
checkResults("HttpBasics");
}
@Test
public void solveAsOtherUserHttpBasics() {
login("steven");
startLesson("HttpBasics");
Map<String, Object> params = new HashMap<>();
params.clear();
params.put("person", "goatuser");
checkAssignment(url("HttpBasics/attack1"), params, true);
}
@Test
public void httpProxies() {
startLesson("HttpProxies");

View File

@ -86,6 +86,10 @@ public abstract class IntegrationTest {
@BeforeEach
public void login() {
login("webgoat");
}
protected void login(String user) {
String location =
given()
.when()