From bfd6cf876b937bcbb77d3e8e8b73a9406a7fda27 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 14 Jul 2021 10:31:07 +1000 Subject: [PATCH] Fixes for tests --- app/Jobs/Account/CreateAccount.php | 2 ++ tests/Unit/GeneratesCounterTest.php | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Jobs/Account/CreateAccount.php b/app/Jobs/Account/CreateAccount.php index 9ea168d03..61c685bc4 100644 --- a/app/Jobs/Account/CreateAccount.php +++ b/app/Jobs/Account/CreateAccount.php @@ -77,6 +77,8 @@ class CreateAccount $sp794f3f->key = Str::random(32); } + $sp794f3f->trial_started = now(); + $sp794f3f->trial_plan = 'pro'; $sp794f3f->save(); $sp035a66 = CreateCompany::dispatchNow($this->request, $sp794f3f); diff --git a/tests/Unit/GeneratesCounterTest.php b/tests/Unit/GeneratesCounterTest.php index df24792e0..6fb5bbe88 100644 --- a/tests/Unit/GeneratesCounterTest.php +++ b/tests/Unit/GeneratesCounterTest.php @@ -175,11 +175,11 @@ class GeneratesCounterTest extends TestCase $invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh()); - $this->assertEquals($invoice_number, '0007'); + $this->assertEquals($invoice_number, '0002'); $invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh()); - $this->assertEquals($invoice_number, '0008'); + $this->assertEquals($invoice_number, '0002'); } public function testQuoteNumberValue() @@ -338,11 +338,11 @@ class GeneratesCounterTest extends TestCase $invoice_number = $this->getNextInvoiceNumber($cliz->fresh(), $this->invoice); - $this->assertEquals($invoice_number, '0007'); + $this->assertEquals($invoice_number, '0002'); $invoice_number = $this->getNextInvoiceNumber($cliz->fresh(), $this->invoice); - $this->assertEquals($invoice_number, '0008'); + $this->assertEquals($invoice_number, '0002'); } public function testClientNumber()