From e648da9dc5825748d233790d84552b74af94f29a Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 12 Jul 2023 16:51:23 +0100 Subject: [PATCH] Also do a sanity-check that the normal asset autoincrementing works --- tests/Unit/AssetTest.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/Unit/AssetTest.php b/tests/Unit/AssetTest.php index 63d335a7b4..7670d10753 100644 --- a/tests/Unit/AssetTest.php +++ b/tests/Unit/AssetTest.php @@ -12,6 +12,17 @@ class AssetTest extends TestCase { use InteractsWithSettings; + public function testAutoIncrement() + { + $this->settings->enableAutoIncrement(); + + $a = Asset::factory()->create(['asset_tag' => Asset::autoincrement_asset() ]); + $b = Asset::factory()->create(['asset_tag' => Asset::autoincrement_asset() ]); + + $this->assertModelExists($a); + $this->assertModelExists($b); + + } public function testAutoIncrementCollision() { $this->settings->enableAutoIncrement(); @@ -125,7 +136,7 @@ class AssetTest extends TestCase $this->assertModelExists($final); $this->assertEquals($final->asset_tag, $final_result); } - + public function testWarrantyExpiresAttribute() {