mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-23 14:40:49 +08:00
feat: add whitelist register mode
This commit is contained in:
@@ -18,7 +18,7 @@ import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
/** Integration tests for review publish mode. */
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
|
||||
properties = "app.post.publish-mode=REVIEW")
|
||||
properties = {"app.post.publish-mode=REVIEW","app.register.mode=DIRECT"})
|
||||
class PublishModeIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
@@ -34,7 +34,7 @@ class PublishModeIntegrationTest {
|
||||
HttpHeaders h = new HttpHeaders();
|
||||
h.setContentType(MediaType.APPLICATION_JSON);
|
||||
rest.postForEntity("/api/auth/register", new HttpEntity<>(
|
||||
Map.of("username", username, "email", email, "password", "pass123"), h), Map.class);
|
||||
Map.of("username", username, "email", email, "password", "pass123", "reason", "integration test reason more than twenty"), h), Map.class);
|
||||
User u = users.findByUsername(username).orElseThrow();
|
||||
if (u.getVerificationCode() != null) {
|
||||
rest.postForEntity("/api/auth/verify", new HttpEntity<>(
|
||||
|
||||
Reference in New Issue
Block a user