File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
tests/Feature/Checkins/Ui Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,10 @@ public function testCheckingInAccessoryRequiresCorrectPermission()
2525
2626 public function testPageRenders ()
2727 {
28+ $ accessory = Accessory::factory ()->checkedOutToUser ()->create ();
29+
2830 $ this ->actingAs (User::factory ()->superuser ()->create ())
29- ->get (route ('accessories.checkin.show ' , Accessory:: factory ()-> checkedOutToUser ()-> create ()->id ))
31+ ->get (route ('accessories.checkin.show ' , $ accessory -> checkouts -> first ()->id ))
3032 ->assertOk ();
3133 }
3234
Original file line number Diff line number Diff line change @@ -24,8 +24,12 @@ public function testCheckingInComponentRequiresCorrectPermission()
2424
2525 public function testPageRenders ()
2626 {
27+ $ component = Component::factory ()->checkedOutToAsset ()->create ();
28+
29+ $ componentAsset = DB ::table ('components_assets ' )->where ('component_id ' , $ component ->id )->first ();
30+
2731 $ this ->actingAs (User::factory ()->superuser ()->create ())
28- ->get (route ('components.checkin.show ' , Component:: factory ()-> checkedOutToAsset ()-> create () ->id ))
32+ ->get (route ('components.checkin.show ' , $ componentAsset ->id ))
2933 ->assertOk ();
3034 }
3135
You can’t perform that action at this time.
0 commit comments