diff --git a/backend/service/ical/icalFileGeneration_test.go b/backend/service/ical/icalFileGeneration_test.go index 7b32999..f48f413 100644 --- a/backend/service/ical/icalFileGeneration_test.go +++ b/backend/service/ical/icalFileGeneration_test.go @@ -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]) + } + } } }) }