/** * Test that a Project can be deleted via interface. */ public function testDeleteForm() { $admin = $this->createSuperuser(); $this->be($admin); $project = $this->createProject(); $this->call('GET', route('project.show', ['project' => $project->id])); $this->assertResponseOk(); $response = $this->call('DELETE', route('project.destroy', ['project' => $project->id]), ['_token' => Session::token()]); $this->assertRedirectedToRoute('project.index'); $project = \VisualAppeal\Connect\Project::find(1); $this->assertNull($project); }