feat: phase 3 website pages on v1 api

This commit is contained in:
Dwindi Ramadhana
2026-02-03 22:37:52 +07:00
parent 8816522ddd
commit b1aefa6b3d
13 changed files with 563 additions and 4 deletions

View 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();
}
}