feat: phase 3 website pages on v1 api
This commit is contained in:
37
app/tests/Feature/SitePagesTest.php
Normal file
37
app/tests/Feature/SitePagesTest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Tests\TestCase;
|
||||
|
||||
class SitePagesTest extends TestCase
|
||||
{
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
config()->set('dewemoji.data_path', base_path('tests/Fixtures/emojis.fixture.json'));
|
||||
}
|
||||
|
||||
public function test_core_pages_are_available(): void
|
||||
{
|
||||
$this->get('/')->assertOk();
|
||||
$this->get('/api-docs')->assertOk();
|
||||
$this->get('/pricing')->assertOk();
|
||||
$this->get('/privacy')->assertOk();
|
||||
$this->get('/terms')->assertOk();
|
||||
}
|
||||
|
||||
public function test_emoji_detail_page_works_with_valid_slug(): void
|
||||
{
|
||||
$this->get('/emoji/grinning-face')
|
||||
->assertOk()
|
||||
->assertSee('grinning face');
|
||||
}
|
||||
|
||||
public function test_emoji_detail_page_returns_404_for_unknown_slug(): void
|
||||
{
|
||||
$this->get('/emoji/unknown-slug')->assertNotFound();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user