mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-10-21 16:05:19 +08:00
fix tests: use valid usernames
This commit is contained in:
@@ -61,10 +61,10 @@ class ComplexFlowIntegrationTest {
|
||||
|
||||
@Test
|
||||
void nestedCommentsVisibleInPost() {
|
||||
String t1 = registerAndLogin("alice", "[email protected]");
|
||||
String t2 = registerAndLogin("bob", "[email protected]");
|
||||
String t1 = registerAndLogin("alice1", "[email protected]");
|
||||
String t2 = registerAndLogin("bob123", "[email protected]");
|
||||
|
||||
String adminToken = registerAndLoginAsAdmin("admin", "[email protected]");
|
||||
String adminToken = registerAndLoginAsAdmin("admin1", "[email protected]");
|
||||
ResponseEntity<Map> catResp = postJson("/api/categories",
|
||||
Map.of("name", "general", "description", "d", "icon", "i"), adminToken);
|
||||
Long catId = ((Number)catResp.getBody().get("id")).longValue();
|
||||
@@ -106,8 +106,8 @@ class ComplexFlowIntegrationTest {
|
||||
|
||||
@Test
|
||||
void reactionsReturnedForPostAndComment() {
|
||||
String t1 = registerAndLogin("carol", "[email protected]");
|
||||
String t2 = registerAndLogin("dave", "[email protected]");
|
||||
String t1 = registerAndLogin("carol1", "[email protected]");
|
||||
String t2 = registerAndLogin("dave01", "[email protected]");
|
||||
|
||||
String adminToken = registerAndLoginAsAdmin("admin2", "[email protected]");
|
||||
List<Map<String, Object>> categories = (List<Map<String, Object>>) rest.getForObject("/api/categories", List.class);
|
||||
|
||||
@@ -66,8 +66,8 @@ class PublishModeIntegrationTest {
|
||||
|
||||
@Test
|
||||
void postRequiresApproval() {
|
||||
String userToken = registerAndLogin("eve", "[email protected]");
|
||||
String adminToken = registerAndLoginAsAdmin("admin", "[email protected]");
|
||||
String userToken = registerAndLogin("eve123", "[email protected]");
|
||||
String adminToken = registerAndLoginAsAdmin("admin1", "[email protected]");
|
||||
|
||||
ResponseEntity<Map> catResp = postJson("/api/categories",
|
||||
Map.of("name", "review", "description", "d", "icon", "i"), adminToken);
|
||||
|
||||
@@ -57,7 +57,7 @@ class SearchIntegrationTest {
|
||||
|
||||
@Test
|
||||
void globalSearchReturnsMixedResults() {
|
||||
String admin = registerAndLoginAsAdmin("admin", "[email protected]");
|
||||
String admin = registerAndLoginAsAdmin("admin1", "[email protected]");
|
||||
String user = registerAndLogin("bob_nice", "[email protected]");
|
||||
|
||||
ResponseEntity<Map> catResp = postJson("/api/categories", Map.of("name", "misc", "description", "d", "icon", "i"), admin);
|
||||
|
||||
Reference in New Issue
Block a user