@@ -11,7 +11,7 @@ public function test_user_can_view_edit_task_form()
11
11
{
12
12
$ this ->disableExceptionHandling ()->signIn ();
13
13
$ task = Task::factory ()->create ();
14
- $ response = $ this ->get (route ('totem.task.edit ' , $ task ));
14
+ $ response = $ this ->get (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ));
15
15
$ response ->assertStatus (200 );
16
16
$ response ->assertSee ($ task ->description );
17
17
$ response ->assertSee ($ task ->expression );
@@ -20,22 +20,22 @@ public function test_user_can_view_edit_task_form()
20
20
public function test_guest_can_not_view_edit_task_form ()
21
21
{
22
22
$ task = Task::factory ()->create ();
23
- $ response = $ this ->get (route ('totem.task.edit ' , $ task ));
23
+ $ response = $ this ->get (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ));
24
24
$ response ->assertStatus (403 );
25
25
}
26
26
27
27
public function test_user_can_edit_task ()
28
28
{
29
29
$ this ->disableExceptionHandling ()->signIn ();
30
30
$ task = Task::factory ()->create ();
31
- $ response = $ this ->post (route ('totem.task.edit ' , $ task ), [
31
+ $ response = $ this ->post (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ), [
32
32
'description ' => 'List All Scheduled Commands ' ,
33
33
'command ' => 'Studio\Totem\Console\Commands\ListSchedule ' ,
34
34
'type ' => 'cron ' ,
35
35
'expression ' => '5 * * * * ' ,
36
36
]);
37
37
38
38
$ response ->assertSessionHas ('task ' );
39
- $ response ->assertRedirect (route ('totem.task.view ' , $ task ));
39
+ $ response ->assertRedirect (route ('totem.task.view ' , [ ' totemTask ' => $ task] ));
40
40
}
41
41
}
0 commit comments