fix: prevent generating offer links while booking is in draft
This commit is contained in:
@@ -134,10 +134,16 @@ class OfferControllerTest extends TestCase
|
||||
yield 'discarded' => [AccommodationBookingStatus::Discarded];
|
||||
}
|
||||
|
||||
public function testViewRendersUnavailableForDiscardedBooking(): void
|
||||
/**
|
||||
* The status is re-read on every view, so an authorized session is no free pass: a
|
||||
* booking pushed back into Entwurf stops showing the offer from that moment on.
|
||||
*
|
||||
* @dataProvider statusesTheCustomerMustNotSee
|
||||
*/
|
||||
public function testViewRendersUnavailableForABookingTheCustomerMustNotSee(AccommodationBookingStatus $status): void
|
||||
{
|
||||
$booking = new AccommodationBooking();
|
||||
$booking->setStatus(AccommodationBookingStatus::Discarded);
|
||||
$booking->setStatus($status);
|
||||
$booking->setAccommodation(new Accommodation());
|
||||
|
||||
$bookingRepository = $this->createMock(AccommodationBookingRepository::class);
|
||||
|
||||
Reference in New Issue
Block a user