test:#53 fixed summary description

This commit is contained in:
Elmar Kresse
2024-04-15 16:33:38 +02:00
parent 0eff1f09a0
commit 5ea6daf759

View File

@ -104,7 +104,7 @@ func TestIcalModel_EmitICal(t *testing.T) {
"DTEND": {"00010101T000000Z"},
"DTSTART": {"00010101T000000Z"},
"SUMMARY": {"Test"},
"DESCRIPTION": {"Notizen: Test\nProf: Test\nTyp: Test\n"},
"DESCRIPTION": {"Profs: Test\nTyp: Test\nNotizen: Test\n"},
"LOCATION": {"Test"},
},
},
@ -203,7 +203,7 @@ func TestIcalModel_EmitICal(t *testing.T) {
"DTEND": {"20231201T010000Z"},
"DTSTART": {"20231201T000000Z"},
"SUMMARY": {"UserDefinedName"},
"DESCRIPTION": {"Notizen: Test\nProf: Test\nGruppe: Test\nTyp: Test\n"},
"DESCRIPTION": {"Profs: Test\nGruppen: Test\nTyp: Test\nNotizen: Test\n"},
"LOCATION": {"ZU430"},
},
},
@ -216,7 +216,7 @@ func TestIcalModel_EmitICal(t *testing.T) {
"DTEND": {"20231201T010000Z"},
"DTSTART": {"20231201T000000Z"},
"SUMMARY": {"UserDefinedName"},
"DESCRIPTION": {"Notizen: Test\nProf: Test\nGruppe: Test\nTyp: Test\n"},
"DESCRIPTION": {"Profs: Test\nGruppen: Test\nTyp: Test\nNotizen: Test\n"},
"LOCATION": {"ZU221"},
},
},
@ -244,7 +244,14 @@ func TestIcalModel_EmitICal(t *testing.T) {
}
if got := generateIcalEmit(icalModel, mockClock); !reflect.DeepEqual(got, tt.want) {
t.Errorf("EmitICal() = %v, want %v", got, tt.want)
t.Errorf("EmitICal() = \n%v, want \n%v", got, tt.want)
// Print the differences
for i, element := range got.Elements {
if !reflect.DeepEqual(element, tt.want.Elements[i]) {
t.Errorf("Element %d: got \n%v, want \n%v", i, element, tt.want.Elements[i])
}
}
}
})
}