mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 13:14:07 -08:00
More unification
This commit is contained in:
parent
f325c4afdb
commit
f5705a1dde
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue