feat: additional confirmation cycle and status for groups inquiries
This commit is contained in:
@@ -274,7 +274,7 @@ class OfferControllerTest extends TestCase
|
||||
|
||||
self::assertInstanceOf(RedirectResponse::class, $response);
|
||||
self::assertSame('/app_groups_booking_offer_view?uuid='.$booking->getUuid(), $response->getTargetUrl());
|
||||
self::assertSame([['type' => 'success', 'message' => 'Deine Buchung ist bestätigt.']], $controller->flashes);
|
||||
self::assertSame([['type' => 'success', 'message' => 'Deine Buchung ist bei uns eingegangen. Sobald sie geprüft ist, erhältst du eine Bestätigung per E-Mail.']], $controller->flashes);
|
||||
}
|
||||
|
||||
public function testConfirmPostValidViaHtmxReturnsHxRedirect(): void
|
||||
@@ -350,7 +350,7 @@ class OfferControllerTest extends TestCase
|
||||
public function testConfirmRedirectsWhenAlreadyAccepted(): void
|
||||
{
|
||||
$booking = new AccommodationBooking();
|
||||
$booking->setStatus(AccommodationBookingStatus::Accepted);
|
||||
$booking->setStatus(AccommodationBookingStatus::Received);
|
||||
|
||||
$bookingRepository = $this->createMock(AccommodationBookingRepository::class);
|
||||
$bookingRepository->method('findOneBy')->willReturn($booking);
|
||||
@@ -474,7 +474,7 @@ final class TestableOfferController extends OfferController
|
||||
$this->renderedParameters = $parameters;
|
||||
|
||||
if ('groups/booking/offer.html.twig' === $view) {
|
||||
$content = $parameters['booking']->isAccepted() ? '<html>confirmed</html>' : '<html>offer</html>';
|
||||
$content = null !== $parameters['booking']->getAcceptedAt() ? '<html>confirmed</html>' : '<html>offer</html>';
|
||||
} else {
|
||||
$content = '<html>unavailable</html>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user