tests: Add end 2 end frontend testing with Cypress (#1403)

This commit is contained in:
Régis Freyd
2018-08-15 21:03:35 -04:00
committed by GitHub
parent beb5a81c48
commit 5aa3afa08a
99 changed files with 1761 additions and 207 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
namespace Tests\Unit\Models;
use Tests\TestCase;
use App\Jobs\AddChangelogEntry;
use App\Models\Account\Account;
use App\Models\Instance\Instance;
use Illuminate\Support\Facades\Bus;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class InstanceTest extends TestCase
{
use DatabaseTransactions;
public function test_it_creates_jobs_for_adding_a_unread_changelog_entry()
{
Bus::fake();
$instance = factory(Instance::class)->create([]);
$account = factory(Account::class, 3)->create([]);
$instance->addUnreadChangelogEntry(1);
Bus::assertDispatched(AddChangelogEntry::class);
}
}