Finish re-working tests to run on test database

This commit is contained in:
Jonny Barnes 2021-08-31 12:28:00 +01:00
parent 09fc211623
commit 1abca77bdc
50 changed files with 535 additions and 265 deletions

View file

@ -6,14 +6,15 @@ namespace Tests\Feature;
use App\Jobs\ProcessBookmark;
use App\Jobs\SyndicateBookmarkToTwitter;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use App\Models\Bookmark;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Queue;
use Tests\TestCase;
use Tests\TestToken;
class BookmarksTest extends TestCase
{
use DatabaseTransactions, TestToken;
use RefreshDatabase, TestToken;
/** @test */
public function bookmarksPageLoadsWithoutError(): void
@ -25,7 +26,8 @@ class BookmarksTest extends TestCase
/** @test */
public function singleBookmarkPageLoadsWithoutError(): void
{
$response = $this->get('/bookmarks/1');
$bookmark = Bookmark::factory()->create();
$response = $this->get('/bookmarks/' . $bookmark->id);
$response->assertViewIs('bookmarks.show');
}