From 02fb5c657b4421e2aaf0f1d21d7cf475bd300103 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Stemmer?= Date: Sun, 6 Oct 2019 17:44:56 +0100 Subject: [PATCH] Update new output tests --- go-junit-report_test.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go-junit-report_test.go b/go-junit-report_test.go index 87acfe7..a768603 100644 --- a/go-junit-report_test.go +++ b/go-junit-report_test.go @@ -1593,16 +1593,17 @@ func testNewParser(input, reportFile, packageName string, t *testing.T) { actual := gtr.JUnit(gtr.FromEvents(events, packageName)) - actual, err := toXML(gtr.JUnit(report)) + expectedXML, err := loadTestReport(reportFile, "") if err != nil { t.Fatal(err) } - expected, err := loadTestReport(reportFile, "") - if err != nil { + var expected junit.Testsuites + if err := xml.Unmarshal([]byte(expectedXML), &expected); err != nil { t.Fatal(err) } + expected.XMLName.Local = "" if diff := cmp.Diff(actual, expected); diff != "" { t.Errorf("Unexpected report diff (-got, +want):\n%v", diff) }