public function testCommentCanBeDeleted() { $chops_id = $this->createChops(); $chops = \ChopBox\Chop::find($chops_id); $id = $this->tester->haveRecord('comments', ['comment' => "this comment has to be deleted", 'user_id' => $chops->user_id, 'chops_id' => $chops->id]); $comment = \ChopBox\Comment::find($id); $comment->delete(); $this->tester->dontSeeRecord('comments', ['comment' => 'this comment has to be deleted']); }
public function testChopsCanBeUpdated() { $id = $this->createChops(); $chops = Chop::find($id); $chops->chops_name = "A new name"; $chops->save(); $this->tester->seeRecord('chops', ['chops_name' => 'A new name']); $this->tester->dontSeeRecord('chops', ['chops_name' => 'Random name']); }