feat: re-generate access links for bookings when sent via email
This commit is contained in:
1 parent
98a303e941
commit
ef439f6faf
9 files changed
+58
-252
No files matched your search
@@ -23,7 +23,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
public function testGetRendersTheConfirmationModal(): void
|
||||
{
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::never())->method('sendCustomerConfirmationEmail');
|
||||
$bookingService->expects(self::never())->method('sendAccessLink');
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class));
|
||||
|
||||
@@ -38,7 +38,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
$booking = $this->openBooking();
|
||||
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::once())->method('sendCustomerConfirmationEmail')->with($booking);
|
||||
$bookingService->expects(self::once())->method('sendAccessLink')->with($booking);
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class));
|
||||
|
||||
@@ -53,7 +53,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
$booking->setAccessLinkIssuedAt(null);
|
||||
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::never())->method('sendCustomerConfirmationEmail');
|
||||
$bookingService->expects(self::never())->method('sendAccessLink');
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class));
|
||||
|
||||
@@ -74,7 +74,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
$booking->setStatus(AccommodationBookingStatus::Draft);
|
||||
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::never())->method('sendCustomerConfirmationEmail');
|
||||
$bookingService->expects(self::never())->method('sendAccessLink');
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class));
|
||||
|
||||
@@ -96,7 +96,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
public function testPostWithAnInvalidTokenIsDenied(): void
|
||||
{
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::never())->method('sendCustomerConfirmationEmail');
|
||||
$bookingService->expects(self::never())->method('sendAccessLink');
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class), tokenValid: false);
|
||||
|
||||
@@ -111,7 +111,7 @@ class SendAccessLinkControllerTest extends TestCase
|
||||
$booking->setEmail(null);
|
||||
|
||||
$bookingService = $this->createMock(AccommodationBookingService::class);
|
||||
$bookingService->expects(self::never())->method('sendCustomerConfirmationEmail');
|
||||
$bookingService->expects(self::never())->method('sendAccessLink');
|
||||
|
||||
$controller = new TestableSendAccessLinkController($bookingService, $this->createMock(LoggerInterface::class));
|
||||
|
||||
|
||||
Reference in new issue
Block a user