mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Add failing test
This commit is contained in:
parent
83ef7c6fe8
commit
675717ff82
|
@ -113,6 +113,20 @@ class AssetStoreTest extends TestCase
|
||||||
$this->assertNull($asset->last_audit_date);
|
$this->assertNull($asset->last_audit_date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testNonDateUsedForLastAuditDateReturnsValidationError()
|
||||||
|
{
|
||||||
|
$response = $this->actingAsForApi(User::factory()->superuser()->create())
|
||||||
|
->postJson(route('api.assets.store'), [
|
||||||
|
'last_audit_date' => 'this-is-not-valid',
|
||||||
|
'asset_tag' => '1234',
|
||||||
|
'model_id' => AssetModel::factory()->create()->id,
|
||||||
|
'status_id' => Statuslabel::factory()->create()->id,
|
||||||
|
])
|
||||||
|
->assertStatusMessageIs('error');
|
||||||
|
|
||||||
|
$this->assertNotNull($response->json('messages.last_audit_date'));
|
||||||
|
}
|
||||||
|
|
||||||
public function testArchivedDepreciateAndPhysicalCanBeNull()
|
public function testArchivedDepreciateAndPhysicalCanBeNull()
|
||||||
{
|
{
|
||||||
$model = AssetModel::factory()->ipadModel()->create();
|
$model = AssetModel::factory()->ipadModel()->create();
|
||||||
|
|
Loading…
Reference in a new issue