diff --git a/app/tests/integration/QueueTest.php b/app/tests/integration/QueueTest.php new file mode 100644 index 0000000..dda22b9 --- /dev/null +++ b/app/tests/integration/QueueTest.php @@ -0,0 +1,36 @@ +container = buildContainer(); + } + + public function testServiceWorker(): void + { + $pagoData = [ + 'fecha' => '2022-01-01', + 'valor' => 10000, + ]; + $pagoService = $this->container->get(Service\Venta\Pago::class); + $pago = $pagoService->add($pagoData); + + $queueService = $this->container->get(Service\Queue::class); + $queueService->run(); + + $pago = $pagoService->getById($pago->id); + $this->assertNotEquals(0.0, $pago->uf); + } +} \ No newline at end of file