diff --git a/tests/Unit/Services/ToggleNameToFavoritesTest.php b/tests/Unit/Services/ToggleNameToFavoritesTest.php index 21e229b..bac34f7 100644 --- a/tests/Unit/Services/ToggleNameToFavoritesTest.php +++ b/tests/Unit/Services/ToggleNameToFavoritesTest.php @@ -55,6 +55,8 @@ public function it_fails_if_the_list_of_favorites_doesnt_exist(): void $user = User::factory()->create(); $name = Name::factory()->create(); + $this->actingAs($user); + $this->expectException(ModelNotFoundException::class); (new ToggleNameToFavorites( nameId: $name->id, diff --git a/tests/Unit/Services/ToggleNameToNameListTest.php b/tests/Unit/Services/ToggleNameToNameListTest.php index 3b13611..fd4678f 100644 --- a/tests/Unit/Services/ToggleNameToNameListTest.php +++ b/tests/Unit/Services/ToggleNameToNameListTest.php @@ -44,6 +44,8 @@ public function it_fails_if_the_list_of_favorites_doesnt_exist(): void $name = Name::factory()->create(); $list = NameList::factory()->create(); + $this->actingAs($user); + $this->expectException(ModelNotFoundException::class); (new ToggleNameToNameList(