chore: commit remaining workspace changes
This commit is contained in:
@@ -9,6 +9,7 @@ declare(strict_types=1);
|
||||
|
||||
use App\Models\Category;
|
||||
use App\Models\ContentType;
|
||||
use App\Models\Artwork;
|
||||
|
||||
beforeEach(function () {
|
||||
foreach (['wallpapers', 'skins', 'photography', 'other'] as $slug) {
|
||||
@@ -168,6 +169,20 @@ it('legacy /category route falls back to /categories and preserves query string
|
||||
->assertStatus(301);
|
||||
});
|
||||
|
||||
it('legacy rate.php artwork route redirects to the canonical artwork URL with 301', function () {
|
||||
$artwork = Artwork::factory()->create([
|
||||
'title' => 'Legacy Rated Artwork',
|
||||
'slug' => 'legacy-rated-artwork',
|
||||
'is_public' => true,
|
||||
'is_approved' => true,
|
||||
'published_at' => now()->subMinute(),
|
||||
]);
|
||||
|
||||
$this->get('/rate.php?skins=' . $artwork->id)
|
||||
->assertRedirect(route('art.show', ['id' => $artwork->id, 'slug' => $artwork->slug]))
|
||||
->assertStatus(301);
|
||||
});
|
||||
|
||||
it('GET /today-in-history redirects to /discover/on-this-day with 301', function () {
|
||||
$this->get('/today-in-history')->assertRedirect('/discover/on-this-day')->assertStatus(301);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user