mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-15 15:02:06 +00:00
fix(multiplayer): validate ranked arena paths durably
This commit is contained in:
@@ -48,6 +48,19 @@ func TestRankedArenaRegistryExcludesElevatedVariants(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsRankedArenaPathOnlyAllowsFloorGoalRegistry(t *testing.T) {
|
||||
for _, path := range []string{"res://scenes/arena_01.tscn", "res://scenes/arena_02.tscn", "res://scenes/arena_03.tscn"} {
|
||||
if !IsRankedArenaPath(path) {
|
||||
t.Fatalf("eligible path %q rejected", path)
|
||||
}
|
||||
}
|
||||
for _, path := range []string{"", "res://scenes/arena_01_elevated.tscn", "res://forged.tscn"} {
|
||||
if IsRankedArenaPath(path) {
|
||||
t.Fatalf("ineligible path %q accepted", path)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestRankedArenaForProposalIsStableAndRotatesEligibleRegistry(t *testing.T) {
|
||||
first := RankedArenaForProposal("proposal-stable")
|
||||
if first != RankedArenaForProposal("proposal-stable") {
|
||||
|
||||
Reference in New Issue
Block a user