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