package iace

import "testing"

// The embedded manifest must always parse and every document must carry a
// source + licence (the register is the auditable provenance shown in the UI).
func TestGetFailureSources_ParsesAndAttributed(t *testing.T) {
	fs := GetFailureSources()
	if fs.Documents == nil {
		t.Fatal("documents must never be nil")
	}
	for _, d := range fs.Documents {
		if d.Source == "" || d.License == "" {
			t.Errorf("doc %d missing source/license: %+v", d.ID, d)
		}
		if !FailureKnowledgeLicenseAllowed(d.License) {
			t.Errorf("doc %d carries a non-allowed licence %q", d.ID, d.License)
		}
	}
}
