feat: enhance sale detail retrieval by including trashed cart items and update related tests
This commit is contained in:
@@ -317,6 +317,11 @@ class AdminAppSaleControllerTest extends TestCase
|
||||
$this->assertSame(Purchase::STATUS_CANCELLED, $purchase->fresh()->status);
|
||||
$this->assertSoftDeleted('carritos', ['id' => $cart->id]);
|
||||
$this->assertSame('converted', Cart::withTrashed()->findOrFail($cart->id)->status);
|
||||
|
||||
$this->getJson("/api/v1/adminapp/tenant/sales/{$purchase->id}")
|
||||
->assertOk()
|
||||
->assertJsonPath('data.items.0.product', 'Entrada general')
|
||||
->assertJsonPath('data.items.0.quantity', 2);
|
||||
}
|
||||
|
||||
public function test_an_adminapp_user_cannot_change_a_sale_from_another_tenant(): void
|
||||
|
||||
Reference in New Issue
Block a user