Improve assertions

This commit is contained in:
Marcus Moore
2024-09-16 14:20:24 -07:00
parent b8b3f91ce4
commit 4af893df61
8 changed files with 31 additions and 25 deletions
@@ -28,7 +28,7 @@ class DeleteComponentsTest extends TestCase implements TestsMultipleFullCompanyS
->deleteJson(route('api.components.destroy', $component))
->assertStatusMessageIs('success');
$this->assertTrue($component->fresh()->trashed());
$this->assertSoftDeleted($component);
}
public function testAdheresToMultipleFullCompanySupportScoping()
@@ -57,8 +57,8 @@ class DeleteComponentsTest extends TestCase implements TestsMultipleFullCompanyS
->deleteJson(route('api.components.destroy', $componentC))
->assertStatusMessageIs('success');
$this->assertNull($componentA->fresh()->deleted_at, 'Component unexpectedly deleted');
$this->assertNull($componentB->fresh()->deleted_at, 'Component unexpectedly deleted');
$this->assertNotNull($componentC->fresh()->deleted_at, 'Component was not deleted');
$this->assertNotSoftDeleted($componentA);
$this->assertNotSoftDeleted($componentB);
$this->assertSoftDeleted($componentC);
}
}