mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
co-authored by
Claude Haiku 4.5
parent
8b25db37ad
commit
012bd1af92
+1
-1
@@ -149,7 +149,7 @@ class AuthControllerLoginTest {
|
||||
.contentType(MediaType.APPLICATION_JSON)
|
||||
.content(objectMapper.writeValueAsString(payload)))
|
||||
.andExpect(status().isUnauthorized())
|
||||
.andExpect(jsonPath("$.error").value("Invalid credentials"));
|
||||
.andExpect(jsonPath("$.error").value("Invalid username or password"));
|
||||
|
||||
verify(loginAttemptService).loginFailed("[email protected]");
|
||||
}
|
||||
|
||||
+3
-3
@@ -125,7 +125,7 @@ class InviteLinkControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void validateInviteTokenReturnsGoneWhenExpired() throws Exception {
|
||||
void validateInviteTokenReturnsNotFoundWhenExpired() throws Exception {
|
||||
InviteToken expired = new InviteToken();
|
||||
expired.setToken("abc");
|
||||
expired.setExpiresAt(LocalDateTime.now().minusHours(1));
|
||||
@@ -133,8 +133,8 @@ class InviteLinkControllerTest {
|
||||
when(inviteTokenRepository.findByToken("abc")).thenReturn(Optional.of(expired));
|
||||
|
||||
mockMvc.perform(get("/api/v1/invite/validate/abc"))
|
||||
.andExpect(status().isGone())
|
||||
.andExpect(jsonPath("$.error").value("This invite link has expired"));
|
||||
.andExpect(status().isNotFound())
|
||||
.andExpect(jsonPath("$.error").value("Invalid invite link"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user