From 73b2b8b25ae3ef20a35feefbe9b7aa7e3aa65bb3 Mon Sep 17 00:00:00 2001 From: alex-chevski Date: Fri, 22 Dec 2023 10:48:57 +0300 Subject: [PATCH] added index test recipe --- tests/Feature/Recipe/IndexTest.php | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/Feature/Recipe/IndexTest.php diff --git a/tests/Feature/Recipe/IndexTest.php b/tests/Feature/Recipe/IndexTest.php new file mode 100644 index 0000000..d4ea94a --- /dev/null +++ b/tests/Feature/Recipe/IndexTest.php @@ -0,0 +1,36 @@ +user = User::factory()->create(['is_consultant' => true]); + $this->recipe = Recipe::inRandomOrder()->first(); + $this->refreshApplicationWithLocale('en'); + } + + public function test_show_form_success() + { + $response = $this + ->actingAs($this->user) + ->get(route('recipe.index')); + + $response + ->assertOk(); + } +}