|
5 | 5 | namespace App\Tests\Service; |
6 | 6 |
|
7 | 7 | use App\Entity\Tenant\Slide; |
8 | | -use App\Exceptions\InteractiveSlideException; |
| 8 | +use App\Exceptions\BadRequestException; |
| 9 | +use App\Exceptions\NotAcceptableException; |
9 | 10 | use App\InteractiveSlide\InstantBook; |
10 | 11 | use App\InteractiveSlide\InteractionSlideRequest; |
11 | 12 | use App\Repository\UserRepository; |
@@ -41,7 +42,7 @@ public function testParseRequestBody(): void |
41 | 42 | { |
42 | 43 | $interactiveService = $this->container->get(InteractiveSlideService::class); |
43 | 44 |
|
44 | | - $this->expectException(InteractiveSlideException::class); |
| 45 | + $this->expectException(BadRequestException::class); |
45 | 46 |
|
46 | 47 | $interactiveService->parseRequestBody([ |
47 | 48 | 'test' => 'test', |
@@ -73,19 +74,19 @@ public function testPerformAction(): void |
73 | 74 | 'data' => [], |
74 | 75 | ]); |
75 | 76 |
|
76 | | - $this->expectException(InteractiveSlideException::class); |
77 | | - $this->expectExceptionMessage('Interactive slide not found'); |
| 77 | + $this->expectException(NotAcceptableException::class); |
| 78 | + $this->expectExceptionMessage('Interactive slide config not found'); |
78 | 79 |
|
79 | 80 | $tenant = $user->getActiveTenant(); |
80 | 81 |
|
81 | | - $interactiveService->performAction($user, $slide, $interactionRequest); |
| 82 | + $interactiveService->performAction($tenant, $slide, $interactionRequest); |
82 | 83 |
|
83 | 84 | $interactiveService->saveConfiguration($tenant, InstantBook::class, []); |
84 | 85 |
|
85 | | - $this->expectException(InteractiveSlideException::class); |
| 86 | + $this->expectException(NotAcceptableException::class); |
86 | 87 | $this->expectExceptionMessage('Action not allowed'); |
87 | 88 |
|
88 | | - $interactiveService->performAction($user, $slide, $interactionRequest); |
| 89 | + $interactiveService->performAction($tenant, $slide, $interactionRequest); |
89 | 90 | } |
90 | 91 |
|
91 | 92 | public function testGetConfigurables(): void |
|
0 commit comments