From b39423831c608d33b8885ccdd9f10dd1f09001a6 Mon Sep 17 00:00:00 2001 From: gouki Date: Wed, 16 Sep 2026 23:06:53 +0000 Subject: [PATCH] test(legacy): align expectations with sablog canonical URLs --- tests/Feature/LegacyRoutesTest.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/Feature/LegacyRoutesTest.php b/tests/Feature/LegacyRoutesTest.php index bb31a70..334ba42 100644 --- a/tests/Feature/LegacyRoutesTest.php +++ b/tests/Feature/LegacyRoutesTest.php @@ -41,11 +41,11 @@ class LegacyRoutesTest extends TestCase public function test_rewrite_style_urls_redirect(): void { - $this->get('/show-12.html')->assertRedirect('/posts/legacy-post.shtml'); - $this->get('/show-12-1.html')->assertRedirect('/posts/legacy-post.shtml'); + $this->get('/show-12.html')->assertRedirect('/show-12.shtml'); + $this->get('/show-12-1.html')->assertRedirect('/show-12.shtml'); $this->get('/category-1.html')->assertRedirect(); $this->get('/archives-'.now()->format('Ymd').'.html')->assertRedirect(); - $this->get('/tagslist.html')->assertRedirect('/tags.shtml'); + $this->get('/tagslist.html')->assertRedirect('/tagslist.shtml'); $this->get('/reg.shtml')->assertRedirect('/register.shtml'); } @@ -55,9 +55,11 @@ class LegacyRoutesTest extends TestCase $this->get('/login.shtml')->assertOk(); $this->get('/comments.shtml')->assertOk(); $this->get('/search.shtml')->assertOk(); - $this->get('/tags.shtml')->assertOk(); + $this->get('/tags.shtml')->assertRedirect('/tagslist.shtml'); + $this->get('/tagslist.shtml')->assertOk(); $this->get('/archives.shtml')->assertOk(); - $this->get('/posts/legacy-post.shtml')->assertOk(); + $this->get('/posts/legacy-post.shtml')->assertRedirect('/show-12.shtml'); + $this->get('/show-12.shtml')->assertOk(); } public function test_no_suffix_urls_redirect_to_shtml(): void