diff --git a/internal/roles/dataset_test.go b/internal/roles/dataset_test.go index b0ba4ff..2037897 100644 --- a/internal/roles/dataset_test.go +++ b/internal/roles/dataset_test.go @@ -67,7 +67,9 @@ func TestCatalogue_unionOfA1AndA4(t *testing.T) { rows[f.D02Row] = true } // Keys are namespaced by the rank that defines them (Nr. 2: R2, R5). - if !strings.HasPrefix(f.Code, "r1.") && !(slices.Contains(f.Sources, "B2") && (strings.HasPrefix(f.Code, "r2.") || strings.HasPrefix(f.Code, "r5."))) { + rank := strings.HasPrefix(f.Code, "r1.") || + slices.Contains(f.Sources, "B2") && (strings.HasPrefix(f.Code, "r2.") || strings.HasPrefix(f.Code, "r5.")) + if !rank { t.Errorf("%s: keys are namespaced by their rank", f.Code) } }