Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -9,6 +9,7 @@ use App\Models\RankList;
use App\Models\User;
use App\Services\RankingService;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Cache;
use Tests\TestCase;
/**
@@ -23,6 +24,13 @@ class RankGlobalTrendingTest extends TestCase
{
use RefreshDatabase;
protected function setUp(): void
{
parent::setUp();
Cache::flush();
}
// ── Test 1: ranked order ───────────────────────────────────────────────
/**
@@ -52,7 +60,7 @@ class RankGlobalTrendingTest extends TestCase
'scope_type' => 'global',
'scope_id' => 0,
'list_type' => 'trending',
'model_version' => 'rank_v1',
'model_version' => (string) config('ranking.model_version', 'rank_v1'),
'artwork_ids' => $rankedOrder,
'computed_at' => now(),
]);
@@ -78,7 +86,7 @@ class RankGlobalTrendingTest extends TestCase
// Meta block is present
$response->assertJsonPath('meta.list_type', 'trending');
$response->assertJsonPath('meta.fallback', false);
$response->assertJsonPath('meta.model_version', 'rank_v1');
$response->assertJsonPath('meta.model_version', (string) config('ranking.model_version', 'rank_v1'));
}
// ── Test 2: diversity constraint ───────────────────────────────────────