mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 15:14:36 -04:00
fixes for tests
This commit is contained in:
parent
c46ebb2778
commit
a8b70ee25c
@ -6,6 +6,7 @@ use App\Factory\InvoiceFactory;
|
|||||||
use App\Factory\InvoiceItemFactory;
|
use App\Factory\InvoiceItemFactory;
|
||||||
use App\Helpers\Invoice\InvoiceCalc;
|
use App\Helpers\Invoice\InvoiceCalc;
|
||||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
use Tests\MockAccountData;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,6 +15,8 @@ use Tests\TestCase;
|
|||||||
*/
|
*/
|
||||||
class InvoiceTest extends TestCase
|
class InvoiceTest extends TestCase
|
||||||
{
|
{
|
||||||
|
use MockAccountData;
|
||||||
|
use DatabaseTransactions;
|
||||||
|
|
||||||
public $invoice;
|
public $invoice;
|
||||||
|
|
||||||
@ -25,15 +28,8 @@ class InvoiceTest extends TestCase
|
|||||||
{
|
{
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
//append a client here - otherwise tests are broken.
|
|
||||||
$this->invoice = InvoiceFactory::create(1,1);//stub the company and user_id
|
|
||||||
|
|
||||||
$client = factory(\App\Models\Client::class)->create([
|
$this->makeTestData();
|
||||||
'user_id' => 1,
|
|
||||||
'company_id' => 1,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->invoice->client_id = $client->id;
|
|
||||||
|
|
||||||
$this->invoice->line_items = $this->buildLineItems();
|
$this->invoice->line_items = $this->buildLineItems();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user