1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/tests/Integration/InvoiceUploadTest.php
David Bomba be3ade65f1
Download Invoice by Invitation (#3312)
* style cs

* Style CS

* Throw Record not found exception if invalid primary key hash is provided

* Improve error handling

* Create abstract implementation for designs

* working on custom designs

* Add Design Model

* invoice services

* Download Invoice by Invitation
2020-02-12 11:41:17 +11:00

39 lines
859 B
PHP

<?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()
{
CreateInvoicePdf::dispatchNow($this->invoice, $this->invoice->company, $this->invoice->client->primary_contact()->first());
$this->assertNotNull($this->invoice->service()->getInvoicePdf());
}
}