added testing to Api check in, renamed other test method
This commit is contained in:
27
tests/Feature/Checkins/Api/LicenseCheckinTest.php
Normal file
27
tests/Feature/Checkins/Api/LicenseCheckinTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Tests\Feature\Checkins\Api;
|
||||
|
||||
use App\Models\LicenseSeat;
|
||||
use App\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
class LicenseCheckinTest extends TestCase
|
||||
{
|
||||
|
||||
public function testUnreassignableLicenseSeatMarkedUponCheckin()
|
||||
{
|
||||
$licenseSeat = LicenseSeat::factory()
|
||||
->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);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ class LicenseCheckinTest extends TestCase
|
||||
->assertForbidden();
|
||||
}
|
||||
|
||||
public function testNonReassignableLicenseSeatIsUnavailable()
|
||||
public function testNonReassignableLicenseSeatCantBeCheckedOut()
|
||||
{
|
||||
$licenseSeat = LicenseSeat::factory()
|
||||
->notReassignable()
|
||||
|
||||
Reference in New Issue
Block a user