We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a35fa7 commit e733d2aCopy full SHA for e733d2a
tests/Feature/Assets/Ui/ShowAssetTest.php
@@ -0,0 +1,26 @@
1
+<?php
2
+
3
+namespace Tests\Feature\Assets\Ui;
4
5
+use App\Models\Asset;
6
+use App\Models\User;
7
+use Tests\TestCase;
8
9
+class ShowAssetTest extends TestCase
10
+{
11
+ public function testPageForAssetWithMissingModelStillRenders()
12
+ {
13
+ $asset = Asset::factory()->create();
14
15
+ $asset->model_id = null;
16
+ $asset->forceSave();
17
18
+ $asset->refresh();
19
20
+ $this->assertNull($asset->fresh()->model_id, 'This test needs model_id to be null to be helpful.');
21
22
+ $this->actingAs(User::factory()->superuser()->create())
23
+ ->get(route('hardware.show', $asset))
24
+ ->assertOk();
25
+ }
26
+}
0 commit comments