@@ -11,7 +11,7 @@ public function test_user_can_view_edit_task_form()
1111 {
1212 $ this ->disableExceptionHandling ()->signIn ();
1313 $ task = Task::factory ()->create ();
14- $ response = $ this ->get (route ('totem.task.edit ' , $ task ));
14+ $ response = $ this ->get (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ));
1515 $ response ->assertStatus (200 );
1616 $ response ->assertSee ($ task ->description );
1717 $ response ->assertSee ($ task ->expression );
@@ -20,22 +20,22 @@ public function test_user_can_view_edit_task_form()
2020 public function test_guest_can_not_view_edit_task_form ()
2121 {
2222 $ task = Task::factory ()->create ();
23- $ response = $ this ->get (route ('totem.task.edit ' , $ task ));
23+ $ response = $ this ->get (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ));
2424 $ response ->assertStatus (403 );
2525 }
2626
2727 public function test_user_can_edit_task ()
2828 {
2929 $ this ->disableExceptionHandling ()->signIn ();
3030 $ task = Task::factory ()->create ();
31- $ response = $ this ->post (route ('totem.task.edit ' , $ task ), [
31+ $ response = $ this ->post (route ('totem.task.edit ' , [ ' totemTask ' => $ task] ), [
3232 'description ' => 'List All Scheduled Commands ' ,
3333 'command ' => 'Studio\Totem\Console\Commands\ListSchedule ' ,
3434 'type ' => 'cron ' ,
3535 'expression ' => '5 * * * * ' ,
3636 ]);
3737
3838 $ response ->assertSessionHas ('task ' );
39- $ response ->assertRedirect (route ('totem.task.view ' , $ task ));
39+ $ response ->assertRedirect (route ('totem.task.view ' , [ ' totemTask ' => $ task] ));
4040 }
4141}
0 commit comments