From be1afe198e8dd1ef3a0f82292618dda5790a9442 Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Tue, 1 Jul 2025 14:09:13 +0800 Subject: [PATCH] fix tests for password length --- .../com/openisle/integration/ComplexFlowIntegrationTest.java | 4 ++-- .../com/openisle/integration/PublishModeIntegrationTest.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/java/com/openisle/integration/ComplexFlowIntegrationTest.java b/src/test/java/com/openisle/integration/ComplexFlowIntegrationTest.java index 578a6f832..baa40aea2 100644 --- a/src/test/java/com/openisle/integration/ComplexFlowIntegrationTest.java +++ b/src/test/java/com/openisle/integration/ComplexFlowIntegrationTest.java @@ -33,12 +33,12 @@ class ComplexFlowIntegrationTest { HttpHeaders h = new HttpHeaders(); h.setContentType(MediaType.APPLICATION_JSON); rest.postForEntity("/api/auth/register", new HttpEntity<>( - Map.of("username", username, "email", email, "password", "pass"), h), Map.class); + Map.of("username", username, "email", email, "password", "pass123"), h), Map.class); User u = users.findByUsername(username).orElseThrow(); rest.postForEntity("/api/auth/verify", new HttpEntity<>( Map.of("username", username, "code", u.getVerificationCode()), h), Map.class); ResponseEntity resp = rest.postForEntity("/api/auth/login", new HttpEntity<>( - Map.of("username", username, "password", "pass"), h), Map.class); + Map.of("username", username, "password", "pass123"), h), Map.class); return (String) resp.getBody().get("token"); } diff --git a/src/test/java/com/openisle/integration/PublishModeIntegrationTest.java b/src/test/java/com/openisle/integration/PublishModeIntegrationTest.java index 270b4dde2..8dc946f4e 100644 --- a/src/test/java/com/openisle/integration/PublishModeIntegrationTest.java +++ b/src/test/java/com/openisle/integration/PublishModeIntegrationTest.java @@ -34,12 +34,12 @@ 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", "pass"), h), Map.class); + Map.of("username", username, "email", email, "password", "pass123"), h), Map.class); User u = users.findByUsername(username).orElseThrow(); rest.postForEntity("/api/auth/verify", new HttpEntity<>( Map.of("username", username, "code", u.getVerificationCode()), h), Map.class); ResponseEntity resp = rest.postForEntity("/api/auth/login", new HttpEntity<>( - Map.of("username", username, "password", "pass"), h), Map.class); + Map.of("username", username, "password", "pass123"), h), Map.class); return (String) resp.getBody().get("token"); }