We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d40460 commit b9b333eCopy full SHA for b9b333e
internal/workflow_testsuite.go
@@ -404,6 +404,13 @@ func (c *MockCallWrapper) Times(i int) *MockCallWrapper {
404
return c
405
}
406
407
+// Maybe indicates that the mock is optional.
408
+// Not calling an optional mock will not cause an error while asserting expectations.
409
+func (c *MockCallWrapper) Maybe() *MockCallWrapper {
410
+ c.call.Maybe()
411
+ return c
412
+}
413
+
414
// Run sets a handler to be called before returning. It can be used when mocking a method such as unmarshalers that
415
// takes a pointer to a struct and sets properties in such struct.
416
func (c *MockCallWrapper) Run(fn func(args mock.Arguments)) *MockCallWrapper {
0 commit comments