Add extensive controller and model tests
This commit is contained in:
13
tests/Feature/I18nControllerTest.php
Normal file
13
tests/Feature/I18nControllerTest.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
it('returns translations for valid locale', function (): void {
|
||||
$response = $this->getJson('/api/i18n/en');
|
||||
|
||||
$response->assertOk();
|
||||
});
|
||||
|
||||
it('returns 404 for missing locale', function (): void {
|
||||
$response = $this->getJson('/api/i18n/xx');
|
||||
|
||||
$response->assertStatus(404);
|
||||
});
|
||||
Reference in New Issue
Block a user