From 63ce2a14fec2551300d4c5f66a26c083a6f5b918 Mon Sep 17 00:00:00 2001 From: Godfrey M Date: Wed, 23 Apr 2025 10:17:11 -0700 Subject: [PATCH] fix the ghosts pt2 --- .../Checkins/Api/LicenseCheckInTest.php | 45 ------------------- .../Checkins/Api/LicenseCheckinTest.php | 45 ------------------- 2 files changed, 90 deletions(-) delete mode 100644 tests/Feature/Checkins/Api/LicenseCheckInTest.php delete mode 100644 tests/Feature/Checkins/Api/LicenseCheckinTest.php diff --git a/tests/Feature/Checkins/Api/LicenseCheckInTest.php b/tests/Feature/Checkins/Api/LicenseCheckInTest.php deleted file mode 100644 index 385933655c..0000000000 --- a/tests/Feature/Checkins/Api/LicenseCheckInTest.php +++ /dev/null @@ -1,45 +0,0 @@ -superuser()->create(); - $this->actingAsForApi($authUser); - - $license = License::factory()->create(); - $oldUser = User::factory()->create(); - - $licenseSeat = LicenseSeat::factory()->for($license)->create([ - 'assigned_to' => $oldUser->id, - 'notes' => 'Previously checked out', - ]); - - $payload = [ - 'assigned_to' => null, - 'asset_id' => null, - 'notes' => 'Checking in the seat', - ]; - - $response = $this->patchJson( - route('api.licenses.seats.update', [$license->id, $licenseSeat->id]), - $payload); - - $response->assertStatus(200) - ->assertJsonFragment([ - 'status' => 'success', - ]); - - $licenseSeat->refresh(); - - $this->assertNull($licenseSeat->assigned_to); - $this->assertNull($licenseSeat->asset_id); - - $this->assertEquals('Checking in the seat', $licenseSeat->notes); - } -} \ No newline at end of file diff --git a/tests/Feature/Checkins/Api/LicenseCheckinTest.php b/tests/Feature/Checkins/Api/LicenseCheckinTest.php deleted file mode 100644 index 385933655c..0000000000 --- a/tests/Feature/Checkins/Api/LicenseCheckinTest.php +++ /dev/null @@ -1,45 +0,0 @@ -superuser()->create(); - $this->actingAsForApi($authUser); - - $license = License::factory()->create(); - $oldUser = User::factory()->create(); - - $licenseSeat = LicenseSeat::factory()->for($license)->create([ - 'assigned_to' => $oldUser->id, - 'notes' => 'Previously checked out', - ]); - - $payload = [ - 'assigned_to' => null, - 'asset_id' => null, - 'notes' => 'Checking in the seat', - ]; - - $response = $this->patchJson( - route('api.licenses.seats.update', [$license->id, $licenseSeat->id]), - $payload); - - $response->assertStatus(200) - ->assertJsonFragment([ - 'status' => 'success', - ]); - - $licenseSeat->refresh(); - - $this->assertNull($licenseSeat->assigned_to); - $this->assertNull($licenseSeat->asset_id); - - $this->assertEquals('Checking in the seat', $licenseSeat->notes); - } -} \ No newline at end of file