From 749dbe7cd9d95ebb6ee738f00f8dc3fced1b8a5a Mon Sep 17 00:00:00 2001 From: Will Martin Date: Thu, 18 Jun 2020 15:56:46 +0200 Subject: [PATCH] Add test for junit reporter skipped message --- reporters/junit_reporter_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/reporters/junit_reporter_test.go b/reporters/junit_reporter_test.go index fba2c2dc7..e0bc11549 100644 --- a/reporters/junit_reporter_test.go +++ b/reporters/junit_reporter_test.go @@ -307,6 +307,9 @@ var _ = Describe("JUnit Reporter", func() { ComponentTexts: []string{"[Top Level]", "A", "B", "C"}, State: specStateCase, RunTime: 5 * time.Second, + Failure: types.SpecFailure{ + Message: "skipped reason", + }, } reporter.SpecWillRun(spec) reporter.SpecDidComplete(spec) @@ -325,7 +328,7 @@ var _ = Describe("JUnit Reporter", func() { Expect(output.Time).To(Equal(reportedSuiteTime)) Expect(output.Errors).To(Equal(0)) Expect(output.TestCases[0].Name).To(Equal("A B C")) - Expect(output.TestCases[0].Skipped).ToNot(BeNil()) + Expect(output.TestCases[0].Skipped.Message).To(ContainSubstring("skipped reason")) }) }) }