build: initialize RetroHub with Laravel, Inertia, Vue, and Horizon
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class ScraperTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_scraper_index_requires_authentication(): void
|
||||
{
|
||||
$this->get(route('scraper.index'))->assertRedirect(route('login'));
|
||||
}
|
||||
|
||||
public function test_scraper_index_can_be_rendered(): void
|
||||
{
|
||||
$user = User::factory()->create();
|
||||
|
||||
$this->actingAs($user)
|
||||
->get(route('scraper.index'))
|
||||
->assertOk();
|
||||
}
|
||||
|
||||
public function test_scraper_search_requires_authentication(): void
|
||||
{
|
||||
$this->getJson(route('scraper.search', ['query' => 'mario']))
|
||||
->assertRedirect();
|
||||
}
|
||||
|
||||
public function test_scraper_apply_requires_authentication(): void
|
||||
{
|
||||
$this->post(route('scraper.apply', 'some-game'))
|
||||
->assertRedirect(route('login'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user