diff --git a/tests/Feature/Checkins/Api/LicenseCheckinTest.php b/tests/Feature/Checkins/Api/LicenseCheckinTest.php new file mode 100644 index 000000000000..e649b9f43b95 --- /dev/null +++ b/tests/Feature/Checkins/Api/LicenseCheckinTest.php @@ -0,0 +1,27 @@ +notReassignable() + ->assignedToUser() + ->create(); + + $this->assertEquals(false, $licenseSeat->unreassignable_seat); + + $this->actingAs(User::factory()->checkoutLicenses()->create()) + ->post(route('licenses.checkin.save', $licenseSeat)); + + $licenseSeat->refresh(); + + $this->assertEquals(true, $licenseSeat->unreassignable_seat); + } +} \ No newline at end of file diff --git a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php index 5cd906fa3576..f1f912cad454 100644 --- a/tests/Feature/Checkins/Ui/LicenseCheckinTest.php +++ b/tests/Feature/Checkins/Ui/LicenseCheckinTest.php @@ -20,7 +20,7 @@ public function testCheckingInLicenseRequiresCorrectPermission() ->assertForbidden(); } - public function testNonReassignableLicenseSeatIsUnavailable() + public function testNonReassignableLicenseSeatCantBeCheckedOut() { $licenseSeat = LicenseSeat::factory() ->notReassignable()