package persistence

import (
	"testing"
)

func TestLayoutAuthoringSchemaRequirementsIncludeStrictOwnershipColumns(t *testing.T) {
	for table, column := range map[string]string{
		"_System_Object":           "Id",
		"_System_Field":            "ObjectId",
		"_System_PageLayout":       "OwnerPack",
		"_System_LayoutAssignment": "OwnerPack",
	} {
		found := false
		for _, requirement := range layoutAuthoringSchemaRequirements {
			if requirement.table != table {
				continue
			}
			for _, candidate := range requirement.columns {
				found = found || candidate == column
			}
		}
		if !found {
			t.Fatalf("Layout authoring readiness omits strict column %s.%s", table, column)
		}
	}
}
