Skip to content

Commit 723ee05

Browse files
committed
refactor: test case to check Malformed version error
- Changed back to do the exact string match.
1 parent 87245ea commit 723ee05

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

credhub/set_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ var _ = Describe("Set", func() {
114114
ch, err := New("https://example.com", ServerVersion("invalid-version"))
115115
Expect(err).ToNot(HaveOccurred())
116116
_, err = ch.SetCredential("some-credential", "some-type", "some-value")
117-
Expect(err).ToNot(BeNil())
118-
Expect(err.Error()).To(MatchRegexp("(?i)malformed version: invalid-version"))
117+
Expect(err).To(MatchError("malformed version: invalid-version"))
119118
})
120119

121120
It("returns an error when request fails", func() {

0 commit comments

Comments
 (0)