/**
  * Test that a department can be edited via form.
  */
 public function testEditForm()
 {
     $admin = $this->createSuperuser();
     $this->be($admin);
     $company = $this->createCompany();
     $department = $this->createCompanyDepartment($company);
     $this->call('GET', route('company.department.edit', ['company' => $company->id, 'department' => $department->id]));
     $this->assertResponseOk();
     $this->call('PUT', route('company.department.update', ['company' => $company->id, 'department' => $department->id]), ['name' => $admin->id, 'phone' => '+12 3456 7890', '_token' => Session::token()]);
     $this->assertRedirectedToRoute('company.department.show', ['company' => $company->id, 'department' => $department->id]);
     $department = CompanyDepartment::find($department->id);
     $this->assertNotNull($department);
     $this->assertEquals('+12 3456 7890', $department->phone);
 }