2020-02-12 01:41:17 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Tests\Integration;
|
|
|
|
|
|
|
|
use App\Jobs\Invoice\CreateInvoicePdf;
|
|
|
|
use Illuminate\Foundation\Testing\Concerns\InteractsWithDatabase;
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
use Tests\MockAccountData;
|
|
|
|
use Tests\TestCase;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @covers App\Services\Invoice\GetInvoicePdf
|
|
|
|
*/
|
|
|
|
class InvoiceUploadTest extends TestCase
|
|
|
|
{
|
|
|
|
use MockAccountData;
|
|
|
|
use DatabaseTransactions;
|
|
|
|
|
|
|
|
public function setUp() :void
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
$this->makeTestData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testInvoiceUploadWorks()
|
|
|
|
{
|
2020-04-16 10:41:25 +02:00
|
|
|
CreateInvoicePdf::dispatchNow($this->invoice->invitations->first());
|
2020-02-12 01:41:17 +01:00
|
|
|
|
2020-02-12 10:18:56 +01:00
|
|
|
$this->assertNotNull($this->invoice->service()->getInvoicePdf($this->invoice->client->primary_contact()->first()));
|
2020-02-12 01:41:17 +01:00
|
|
|
}
|
2020-03-21 06:37:30 +01:00
|
|
|
}
|