diff --git a/tests/Unit/OrderTests.php b/tests/Unit/OrderTests.php new file mode 100644 index 0000000..8af869b --- /dev/null +++ b/tests/Unit/OrderTests.php @@ -0,0 +1,38 @@ +create(); + $orders = Order::factory()->for($customer)->count(2)->create(); + + livewire(ListOrders::class) + ->assertCanSeeTableRecords($orders); +}); + +it('can create a post', function () { + $customer = Customer::factory()->create(); + $formData = Order::factory()->for($customer)->create(); + + $formData['order_products'] = OrderProduct::factory()->count(2)->create(); + + $formData['order_products'][0]['xs'] = 4; + $formData['order_products'][1]['s'] = 3; + + $serviceFile1 = ServiceFile::factory()->create(); + $serviceFile2 = ServiceFile::factory()->create(); + + $formData['services'][0] = ProductService::factory()->for($serviceFile1)->create(); + $formData['services'][1] = ProductService::factory()->for($serviceFile2)->create(); + + dd($formData); +});