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.show', ['recipe' => $this->recipe->id])); $response ->assertOk(); } }