Manage redirects, missing URLs, repositories and settings through the API
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,13 +9,18 @@ use App\Models\Call;
|
||||
use App\Models\Category;
|
||||
use App\Models\Client;
|
||||
use App\Models\Member;
|
||||
use App\Models\MissingUrl;
|
||||
use App\Models\Page;
|
||||
use App\Models\Project;
|
||||
use App\Models\Redirect;
|
||||
use App\Models\Repository;
|
||||
use App\Models\Service;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Talk;
|
||||
use App\Models\Technology;
|
||||
use App\Models\Testimonial;
|
||||
use App\Models\User;
|
||||
use App\Support\Maintenance;
|
||||
use Database\Seeders\RolePermissionSeeder;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
@@ -82,6 +87,9 @@ class AdminApiContractTest extends TestCase
|
||||
'talks' => ['path' => '/v1/talks'],
|
||||
'calls' => ['path' => '/v1/calls'],
|
||||
'applications' => ['path' => '/v1/applications'],
|
||||
'redirects' => ['path' => '/v1/redirects'],
|
||||
'missing-urls' => ['path' => '/v1/missing-urls'],
|
||||
'repositories' => ['path' => '/v1/repositories'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -99,6 +107,10 @@ class AdminApiContractTest extends TestCase
|
||||
$talk = Talk::factory()->create();
|
||||
$call = Call::factory()->create();
|
||||
$application = Application::factory()->for($call)->create();
|
||||
$redirect = Redirect::factory()->create();
|
||||
$missingUrl = MissingUrl::factory()->create();
|
||||
$repository = Repository::factory()->create();
|
||||
Setting::set(Maintenance::KEY, ['enabled' => false]);
|
||||
|
||||
// One request, one documented path — the URL a real caller hits and
|
||||
// the path key that describes it, side by side rather than derived
|
||||
@@ -127,6 +139,15 @@ class AdminApiContractTest extends TestCase
|
||||
'call' => ["/v1/calls/{$call->id}", '/v1/calls/{call}'],
|
||||
'applications' => ['/v1/applications', '/v1/applications'],
|
||||
'application' => ["/v1/applications/{$application->id}", '/v1/applications/{application}'],
|
||||
'redirects' => ['/v1/redirects', '/v1/redirects'],
|
||||
'redirect' => ["/v1/redirects/{$redirect->id}", '/v1/redirects/{redirect}'],
|
||||
'missing-urls' => ['/v1/missing-urls', '/v1/missing-urls'],
|
||||
'missing-url' => ["/v1/missing-urls/{$missingUrl->id}", '/v1/missing-urls/{missing_url}'],
|
||||
'repositories' => ['/v1/repositories', '/v1/repositories'],
|
||||
'repository' => ["/v1/repositories/{$repository->id}", '/v1/repositories/{repository}'],
|
||||
'settings' => ['/v1/settings', '/v1/settings'],
|
||||
'setting' => ['/v1/settings/'.Maintenance::KEY, '/v1/settings/{setting}'],
|
||||
'maintenance' => ['/v1/maintenance', '/v1/maintenance'],
|
||||
'users' => ['/v1/users', '/v1/users'],
|
||||
'user' => ["/v1/users/{$this->caller->id}", '/v1/users/{user}'],
|
||||
'me' => ['/v1/me', '/v1/me'],
|
||||
|
||||
Reference in New Issue
Block a user