From ad1a367ab5b86a7abad96a75ac25f1383fa97e69 Mon Sep 17 00:00:00 2001 From: Antonin <9219052+antonincms@users.noreply.github.com> Date: Thu, 18 Jan 2024 14:41:55 +0100 Subject: [PATCH] Update test in case keeping msg is desired --- matchers/be_comparable_to_matcher_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matchers/be_comparable_to_matcher_test.go b/matchers/be_comparable_to_matcher_test.go index 8e3af77e5..17a113c31 100644 --- a/matchers/be_comparable_to_matcher_test.go +++ b/matchers/be_comparable_to_matcher_test.go @@ -138,12 +138,12 @@ var _ = Describe("BeComparableTo", func() { Exported string } - It("should produce failure message according to paseed cmp.Option", func() { + It("should produce failure message according to passed cmp.Option", func() { actual := structWithUnexportedFields{unexported: "xxx", Exported: "exported field value"} expectedEqual := structWithUnexportedFields{unexported: "yyy", Exported: "exported field value"} matcherWithEqual := BeComparableTo(expectedEqual, cmpopts.IgnoreUnexported(structWithUnexportedFields{})) - Expect(matcherWithEqual.FailureMessage(actual)).To(BeEmpty()) + Expect(matcherWithEqual.FailureMessage(actual)).To(BeEquivalentTo("Expected object to be comparable, diff: ")) expectedDiffernt := structWithUnexportedFields{unexported: "xxx", Exported: "other value"} matcherWithDifference := BeComparableTo(expectedDiffernt, cmpopts.IgnoreUnexported(structWithUnexportedFields{}))