Exemplo n.º 1
0
 /**
  * @param FunctionalTester\UserSteps $I
  *
  * @actor FunctionalTester\UserSteps
  *
  * @return void
  */
 public function updateComment(FunctionalTester\UserSteps $I)
 {
     $I->am('Developer User');
     $I->wantTo('edit an existing comment');
     $admin = $I->createUser(2, 4);
     $I->login($admin->email, '123', $admin->firstname);
     $project = $I->createProject(1, [$admin]);
     $issue = $I->createIssue(1, $admin, $admin, $project);
     $comment = $I->createComment(1, $admin, $issue);
     $uri = $I->getApplication()->url->action('Project\\IssueController@postEditComment', ['comment' => $comment]);
     $I->sendAjaxPostRequest($uri, ['body' => 'Comment one updated', '_token' => csrf_token()]);
     $I->seeResponseCodeIs(200);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->see('Comment one updated', '#comment' . $comment->id . ' .content');
 }