horizon-mod-registry: the form's test sends a shader pack through the game's check

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-25 16:38:54 +01:00
parent 1285247230
commit 390da26cf4
+3 -2
View File
@@ -342,11 +342,12 @@ async fn what_the_form_refuses() {
);
let (status, json) = client.submit(&csrf, &f, &file).await;
assert_eq!(status, StatusCode::BAD_REQUEST, "{json}");
// Shader packs aren't open.
// A shader pack runs the game's own check: a mod's file isn't one.
let mut f = form();
f["kind"] = json!("shader");
let (status, json) = client.submit(&csrf, &f, &file).await;
refused(status, &json, "shader packs open");
assert_eq!(status, StatusCode::BAD_REQUEST, "{json}");
refused(status, &json, "horizon-shaders.toml: missing");
// An update by someone who isn't an owner.
let owned = "id = \"coords_hud\"\nkind = \"mod\"\nname = \"C\"\nsummary = \"s\"\nowners = [\"bob\"]\nlicense = \"MIT\"\nsource = \"https://x.test\"\n\n[[versions]]\nversion = \"0.0.1\"\npublished = \"2026-01-01\"\ngame = \"26.3\"\nfile = \"coords_hud-0.0.1.hmod\"\nsha256 = \"0000000000000000000000000000000000000000000000000000000000000000\"\n";
mock.lock()