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:
parent
ec97568ec2
commit
d08a56d351
@ -34,6 +34,16 @@ public class GeneralLessonIntegrationTest extends IntegrationTest {
|
|||||||
checkResults("HttpBasics");
|
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
|
@Test
|
||||||
public void httpProxies() {
|
public void httpProxies() {
|
||||||
startLesson("HttpProxies");
|
startLesson("HttpProxies");
|
||||||
|
@ -86,6 +86,10 @@ public abstract class IntegrationTest {
|
|||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
public void login() {
|
public void login() {
|
||||||
|
login("webgoat");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void login(String user) {
|
||||||
String location =
|
String location =
|
||||||
given()
|
given()
|
||||||
.when()
|
.when()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user