Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Jan 25, 2024
1 parent 379600d commit a7c3bc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/app/Services/DynamicBookingsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function dynamicModifiers(array $request, $aggregate, $target_user)

if ($i == 3) {
\Log::warning('Errore in lettura dinamici della prenotazione: ' . $e->getMessage());
return [
return (object) [
'target' => '',
'status' => 'error',
'message' => $e->getMessage(),
Expand Down
4 changes: 2 additions & 2 deletions code/tests/Services/DynamicBookingsServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ public function testFriend()
*/
public function testFailsToRead()
{
$this->expectException(AuthException::class);
$this->actingAs($this->userWithBasePerms);
app()->make('DynamicBookingsService')->dynamicModifiers(['action' => 'booked'], $this->order->aggregate, $this->userWithShippingPerms);
$ret = app()->make('DynamicBookingsService')->dynamicModifiers(['action' => 'booked'], $this->order->aggregate, $this->userWithShippingPerms);
$this->assertEquals('error', $ret->status);
}

/*
Expand Down

0 comments on commit a7c3bc7

Please sign in to comment.