package settings import ( "strings" "testing" ) // ── SCENARIO G (R-220) — AN EMPTY LIST MUST EXPLAIN ITSELF ────────────────────────────────────── // // The old refusal said "choose an attached drive from the list" while the list was empty — on a // rebuilt box, for a reason the customer had no part in and could not see. Measured three times live. // A refusal that names an action the customer cannot perform is the I3 breach the campaign recorded. // // RED-PROOF: restore the old sentence and this FAILS on the impossible-action assertion. func TestRefuseAppNamespace_DoesNotNameAnImpossibleAction(t *testing.T) { msg := refuseAppNamespaceUndeterminable if strings.Contains(msg, "Válasszon a listából") { t.Fatal("R-220's I3 breach RETURNED: the refusal tells the customer to choose from a list that may be empty") } // It must say WHY the list can be empty — the rebuild — so the state is explicable. if !strings.Contains(msg, "újratelepítettük") && !strings.Contains(msg, "újra") { t.Fatalf("the refusal must explain why the drive is unregistered; got %q", msg) } // And point somewhere a customer can actually go. if !strings.Contains(msg, "Meghajtók") { t.Fatalf("the refusal must name where re-attaching happens; got %q", msg) } // It must not promise an outcome it cannot know. for _, forbidden := range []string{"biztosan", "garantál", "mindig sikerül"} { if strings.Contains(msg, forbidden) { t.Errorf("the refusal promises an outcome it cannot know (%q)", forbidden) } } // The NAS refusal is a different situation and keeps its own wording — it points at a list that // genuinely does have entries, so it is not the same defect. if !strings.Contains(refuseAppNamespaceNetwork, "Válasszon csatlakoztatott meghajtót") { t.Fatal("the NAS refusal was changed; it is a different situation and was not part of R-220") } }