mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-30 12:24:53 +00:00
Add failing test
This commit is contained in:
27
tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php
Normal file
27
tests/Feature/Checkouts/Ui/BulkAssetCheckoutTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Checkouts\Ui;
|
||||
|
||||
use App\Models\User;
|
||||
use Tests\TestCase;
|
||||
|
||||
class BulkAssetCheckoutTest extends TestCase
|
||||
{
|
||||
public function testHandleMissingModelBeingIncluded()
|
||||
{
|
||||
$this->actingAs(User::factory()->checkoutAssets()->create())
|
||||
->post(route('hardware.bulkcheckout.store'), [
|
||||
'selected_assets' => [
|
||||
1,
|
||||
9999999,
|
||||
],
|
||||
'checkout_to_type' => 'user',
|
||||
'assigned_user' => User::factory()->create()->id,
|
||||
'assigned_asset' => null,
|
||||
'checkout_at' => null,
|
||||
'expected_checkin' => null,
|
||||
'note' => null,
|
||||
])
|
||||
->assertSessionHas('error', trans_choice('admin/hardware/message.multi-checkout.error', 2));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user