Skip to content

Commit a290f00

Browse files
committed
chore: make sure the OpenAPI document URL is in the response
1 parent c0c2eb2 commit a290f00

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tests/ScalarTest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,21 @@
1818
$response->assertViewIs('scalar::reference');
1919
});
2020

21+
it('contains the OpenAPI document URL', function () {
22+
$response = $this->get(config('scalar.path'));
23+
24+
$response->assertOk()
25+
->assertViewIs('scalar::reference')
26+
->assertSee('data-url')
27+
->assertSee(config('scalar.url'));
28+
});
29+
2130
it('contains the jsDelivr URL', function () {
2231
$response = $this->get(config('scalar.path'));
2332

24-
$response->assertSee(config('scalar.cdn'));
33+
$response->assertOk()
34+
->assertViewIs('scalar::reference')
35+
->assertSee('https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json');
2536
});
2637

2738
it('reflects changes in the config', function () {

0 commit comments

Comments
 (0)