forked from eatvio/eatvio-infra
make permission for plan edit only author can edit his plan
This commit is contained in:
@@ -32,11 +32,14 @@ class EditTest extends TestCase
|
||||
$this->plan = Plan::factory()->create();
|
||||
}
|
||||
|
||||
public function test_show_form_edit_plan(): void
|
||||
public function test_show_form_edit_plan_success_for_author(): void
|
||||
{
|
||||
$plan = $this->plan;
|
||||
$plan->author()->attach($this->user->id);
|
||||
|
||||
$response = $this
|
||||
->actingAs($this->user)
|
||||
->get(route('plan.edit', $this->plan));
|
||||
->get(route('plan.edit', $plan));
|
||||
|
||||
$response->assertSuccessful();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user