File tree 2 files changed +14
-1
lines changed
resources/views/accessories
tests/Feature/Accessories/Ui
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -324,7 +324,11 @@ class="table table-striped snipe-table"
324
324
</strong >
325
325
</div >
326
326
<div class =" col-md-9" style =" word-wrap : break-word ;" >
327
- {{ $accessory -> adminuser ?-> present ()-> fullName () } }
327
+ @if ($accessory -> adminuser )
328
+ {{ $accessory -> adminuser -> present ()-> fullName () } }
329
+ @else
330
+ {{ trans (' admin/reports/general.deleted_user' ) } }
331
+ @endif
328
332
</div >
329
333
</div >
330
334
Original file line number Diff line number Diff line change @@ -47,4 +47,13 @@ public function testPageRenders()
47
47
->assertOk ();
48
48
49
49
}
50
+
51
+ public function testHandlesAccessoryCreatorNotExisting ()
52
+ {
53
+ $ accessory = Accessory::factory ()->create (['created_by ' => 999999 ]);
54
+
55
+ $ this ->actingAs (User::factory ()->superuser ()->create ())
56
+ ->get (route ('accessories.show ' , $ accessory ))
57
+ ->assertOk ();
58
+ }
50
59
}
You can’t perform that action at this time.
0 commit comments