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