applied jobs to tests

This commit is contained in:
denisdulici
2019-11-17 15:06:00 +03:00
parent 272905decc
commit 58048a1979
25 changed files with 194 additions and 186 deletions

View File

@ -2,7 +2,7 @@
namespace Tests\Feature\Incomes;
use App\Models\Banking\Transaction;
use App\Jobs\Banking\CreateTransaction;
use Illuminate\Http\UploadedFile;
use Tests\Feature\FeatureTestCase;
@ -37,7 +37,7 @@ class RevenuesTest extends FeatureTestCase
{
$request = $this->getRevenueRequest();
$revenue = Transaction::create($request);
$revenue = $this->dispatch(new CreateTransaction($request));
$request['name'] = $this->faker->text(15);
@ -50,7 +50,7 @@ class RevenuesTest extends FeatureTestCase
public function testItShouldDeleteRevenue()
{
$revenue = Transaction::create($this->getRevenueRequest());
$revenue = $this->dispatch(new CreateTransaction($this->getRevenueRequest()));
$this->loginAs()
->delete(route('revenues.destroy', $revenue->id))