mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-24 04:03:34 -08:00
Use from routes for posting
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
670021a482
commit
97ead7120e
|
@ -71,10 +71,12 @@ class AccessoryCheckoutTest extends TestCase
|
|||
|
||||
public function testAccessoryCanBeCheckedOutWithQuantity()
|
||||
{
|
||||
//$this->withoutExceptionHandling();
|
||||
$accessory = Accessory::factory()->create(['qty'=>5]);
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs(User::factory()->checkoutAccessories()->create())
|
||||
->from(route('accessories.checkout.show', $accessory))
|
||||
->post(route('accessories.checkout.store', $accessory), [
|
||||
'assigned_to' => $user->id,
|
||||
'checkout_qty' => 3,
|
||||
|
@ -101,6 +103,7 @@ class AccessoryCheckoutTest extends TestCase
|
|||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs(User::factory()->checkoutAccessories()->create())
|
||||
->from(route('accessories.checkout.show', $accessory))
|
||||
->post(route('accessories.checkout.store', $accessory), [
|
||||
'assigned_to' => $user->id,
|
||||
]);
|
||||
|
@ -115,6 +118,7 @@ class AccessoryCheckoutTest extends TestCase
|
|||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($actor)
|
||||
->from(route('accessories.checkout.show', $accessory))
|
||||
->post(route('accessories.checkout.store', $accessory), [
|
||||
'assigned_to' => $user->id,
|
||||
'note' => 'oh hi there',
|
||||
|
|
Loading…
Reference in a new issue