Skip to content

Commit

Permalink
More unification
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusmoore committed Sep 16, 2024
1 parent f325c4a commit f5705a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/Feature/Departments/Api/DeleteDepartmentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ public function testAdheresToMultipleFullCompanySupportScoping()
->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()
Expand All @@ -61,7 +61,7 @@ public function testCannotDeleteDepartmentThatStillHasUsers()
->deleteJson(route('api.departments.destroy', $department))
->assertStatusMessageIs('error');

$this->assertNotNull($department->fresh(), 'Department unexpectedly deleted');
$this->assertDatabaseHas('departments', ['id' => $department->id]);
}

public function testCanDeleteDepartment()
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Depreciations/Api/DeleteDepreciationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testCannotDeleteDepreciationThatHasAssociatedModels()
->deleteJson(route('api.depreciations.destroy', $depreciation))
->assertStatusMessageIs('error');

$this->assertNotNull($depreciation->fresh(), 'Depreciation unexpectedly deleted');
$this->assertDatabaseHas('depreciations', ['id' => $depreciation->id]);
}

public function testCanDeleteDepreciation()
Expand Down

0 comments on commit f5705a1

Please sign in to comment.