Replace selectable name sets with a country that owns names and climate presets.
Create picks a country; climate is rolled from the school seed and stored. Old Slavic saves lift as Russia. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -37,6 +37,34 @@ public class ServiceabilityTests(AppHostFixture fixture)
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CurrentFormatSave_WithoutCountryId_LeavesTheSchoolUnstartedAndTheFileUntouched()
|
||||
{
|
||||
using var client = fixture.App.CreateHttpClient("server");
|
||||
await SchoolApiTests.ResetAsync(client);
|
||||
var directory = await SavesDirectoryAsync(client);
|
||||
|
||||
try
|
||||
{
|
||||
InstallGolden(directory, "current");
|
||||
var path = Path.Combine(directory, "1.json");
|
||||
BumpFormat(path, 3);
|
||||
var before = File.ReadAllBytes(path);
|
||||
|
||||
using var reload = await client.PostAsync("/api/dev/reload-schools", content: null, TestContext.Current.CancellationToken);
|
||||
reload.EnsureSuccessStatusCode();
|
||||
|
||||
Assert.Empty((await SchoolApiTests.GetSchoolsAsync(client)).Schools);
|
||||
Assert.Equal(before, File.ReadAllBytes(path));
|
||||
}
|
||||
finally
|
||||
{
|
||||
DeleteSchoolFiles(directory, 1);
|
||||
using var cleanup = await client.PostAsync("/api/dev/reload-schools", content: null, TestContext.Current.CancellationToken);
|
||||
cleanup.EnsureSuccessStatusCode();
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CurrentFormatSave_LoadsAsBefore()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user