Preserve campaign defaults in materialized sessions

This commit is contained in:
2026-11-20 13:38:21 +00:00
parent 38866110a7
commit 25c59ff62f
8 changed files with 92 additions and 18 deletions

View File

@@ -61,7 +61,7 @@ func TestPrepareMaterializesImportedDocumentsWithoutAuthoringFiles(t *testing.T)
if err != nil || preparedCampaign.Inputs.SpeakersFile != filepath.Join(dir, "speakers.yml") {
t.Fatalf("prepared campaign = %#v, %v", preparedCampaign, err)
}
preparedSession, err := config.LoadSession(filepath.Join(paths.InputsDir, "session.yml"))
preparedSession, err := config.LoadSessionWithOptions(filepath.Join(paths.InputsDir, "session.yml"), config.SessionLoadOptions{Campaign: preparedCampaign, CampaignPath: filepath.Join(paths.InputsDir, "campaign.yml")})
if err != nil || preparedSession.Title != "Imported title" || preparedSession.Inputs.SpeakersFile != filepath.Join(dir, "speakers.yml") {
t.Fatalf("prepared session = %#v, %v", preparedSession, err)
}