Working on tests

This commit is contained in:
= 2021-07-30 19:08:49 +10:00
parent 9e167dabcd
commit 623d75153c

View File

@ -118,27 +118,28 @@ class DeleteInvoiceTest extends TestCase
$this->assertEquals(0, $invoice->client->balance); $this->assertEquals(0, $invoice->client->balance);
$this->assertEquals(20, $invoice->client->paid_to_date); $this->assertEquals(20, $invoice->client->paid_to_date);
/*
//partially refund payment //partially refund payment
$payment = $invoice->fresh()->payments()->first(); $payment = $invoice->fresh()->payments()->first();
$data = [ $data = [
'id' => $this->encodePrimaryKey($payment->id), 'id' => $payment->id,
'amount' => 10, 'amount' => 10,
'invoices' => [ 'invoices' => [
[ [
'invoice_id' => $invoice->hashed_id, 'invoice_id' => $invoice->id,
'amount' => 10, 'amount' => 10,
], ],
], ],
'date' => '2020/12/12', 'date' => '2020/12/12',
'gateway_refund' => false
]; ];
$payment->refund($data); $payment->refund($data);
$this->assertEquals(10, $payment->fresh()->refunded); $this->assertEquals(10, $payment->fresh()->refunded);
*/
//test balances //test balances
//cancel invoice and paid_to_date //cancel invoice and paid_to_date