More unification

This commit is contained in:
Marcus Moore 2024-09-16 14:34:55 -07:00
parent f325c4afdb
commit f5705a1dde
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View file

@ -48,9 +48,9 @@ class DeleteDepartmentTest extends TestCase implements TestsMultipleFullCompanyS
->deleteJson(route('api.departments.destroy', $departmentC))
->assertStatusMessageIs('success');
$this->assertNotNull($departmentA->fresh(), 'Department unexpectedly deleted');
$this->assertNotNull($departmentB->fresh(), 'Department unexpectedly deleted');
$this->assertNull($departmentC->fresh(), 'Department was not deleted');
$this->assertDatabaseHas('departments', ['id' => $departmentA->id]);
$this->assertDatabaseHas('departments', ['id' => $departmentB->id]);
$this->assertDatabaseMissing('departments', ['id' => $departmentC->id]);
}
public function testCannotDeleteDepartmentThatStillHasUsers()
@ -61,7 +61,7 @@ class DeleteDepartmentTest extends TestCase implements TestsMultipleFullCompanyS
->deleteJson(route('api.departments.destroy', $department))
->assertStatusMessageIs('error');
$this->assertNotNull($department->fresh(), 'Department unexpectedly deleted');
$this->assertDatabaseHas('departments', ['id' => $department->id]);
}
public function testCanDeleteDepartment()

View file

@ -28,7 +28,7 @@ class DeleteDepreciationTest extends TestCase implements TestsPermissionsRequire
->deleteJson(route('api.depreciations.destroy', $depreciation))
->assertStatusMessageIs('error');
$this->assertNotNull($depreciation->fresh(), 'Depreciation unexpectedly deleted');
$this->assertDatabaseHas('depreciations', ['id' => $depreciation->id]);
}
public function testCanDeleteDepreciation()