Akzeptiere die Shinkan-Adresse mit und ohne /api-Pfad
Deploy Test / test (push) Successful in 2m28s
Deploy Test / deploy (push) Successful in 25s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-23 18:19:32 +01:00
1 parent b901b02cce
commit e5b3eea7de
2 files changed
+23 -1

No files matched your search

+13
View File
@@ -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')