/** * @test */ public function it_deletes_an_attendee() { //arrange $this->make('App\\Attendee'); $attendee = App\Attendee::first(); //act $response = $this->getJson('attendees/' . $attendee->id, 'DELETE'); $attendee = App\Attendee::onlyTrashed()->find($attendee->id); //assert $this->assertResponseStatus(200); $this->assertObjectHasAttributes($response, 'message'); $this->assertContains('The attendee has been deleted.', $response->message); $this->assertEquals($attendee->trashed(), True); }