feat: add unit and integration tests for rental management domain
- Introduced RentPaymentCorrectionTest and RentPaymentTest to validate payment and refund logic. - Added PhoneNumberTest to ensure proper normalization of phone numbers. - Created TenantTest to verify attachment management and tenant referencing. - Implemented ReplacementRentalApiJourneyIT for end-to-end testing of rental and payment workflows. - Documented architectural decisions in ADR-0014, emphasizing strict DDD boundaries and transaction management.
This commit is contained in:
1 parent
6ce0719a20
commit
e02ad54bcb
263 files changed
+10847
-7183
No files matched your search
@@ -7,7 +7,7 @@ interface UserResponse {
|
||||
email?: string;
|
||||
}
|
||||
|
||||
export type SessionStatus = 'checking' | 'authenticated' | 'anonymous' | 'error';
|
||||
export type SessionStatus = 'checking' | 'authenticated' | 'anonymous' | 'signing-out' | 'error';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class SessionService {
|
||||
@@ -32,4 +32,18 @@ export class SessionService {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
logout(): void {
|
||||
if (this.status() === 'signing-out') return;
|
||||
this.status.set('signing-out');
|
||||
this.http.post('/logout', null, { responseType: 'text' }).subscribe({
|
||||
next: () => {
|
||||
window.location.href = '/';
|
||||
},
|
||||
error: () => {
|
||||
this.status.set('authenticated');
|
||||
window.alert('Impossible de vous déconnecter. Réessayez.');
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user