Co-authored-by: Claude Haiku 4.5 <[email protected]>
This commit is contained in:
Anthony Stirling
2026-03-02 13:56:39 +00:00
committed by GitHub
co-authored by Claude Haiku 4.5
parent 8b25db37ad
commit 012bd1af92
21 changed files with 407 additions and 66 deletions
@@ -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]");
}
@@ -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