Akzeptiere die Shinkan-Adresse mit und ohne /api-Pfad
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b901b02cce
commit
e5b3eea7de
2 files changed
+23
-1
No files matched your search
@@ -452,6 +452,19 @@ public function test_the_key_from_the_server_environment_wins_and_an_existing_co
|
||||
$this->assertFalse(app(ShinkanImport::class)->configured());
|
||||
}
|
||||
|
||||
public function test_the_address_may_name_the_installation_or_its_api_path_without_doubling_the_path(): void
|
||||
{
|
||||
foreach (['https://dev.shinkan.jinkendo.de', 'https://dev.shinkan.jinkendo.de/', 'https://dev.shinkan.jinkendo.de/api', 'https://dev.shinkan.jinkendo.de/api/', 'https://dev.shinkan.jinkendo.de/api/distribution/v1'] as $configured) {
|
||||
config(['services.shinkan.url' => $configured]);
|
||||
$this->freshHttp();
|
||||
Http::fake(['dev.shinkan.jinkendo.de/*' => Http::response(['exercises' => [], 'changes' => [], 'next_cursor' => 'c'])]);
|
||||
|
||||
$this->assertTrue(app(ShinkanImport::class)->check()['ok'], $configured);
|
||||
Http::assertSent(fn ($request): bool => $request->url() === 'https://dev.shinkan.jinkendo.de/api/distribution/v1/catalog'
|
||||
&& $request->hasHeader('Authorization', 'Bearer geheim-fuer-den-test'));
|
||||
}
|
||||
}
|
||||
|
||||
public function test_the_exercise_list_leads_to_the_takeover_page(): void
|
||||
{
|
||||
Livewire::actingAs($this->staff('redakteur'), 'staff')
|
||||
|
||||
Reference in new issue
Block a user