align task with description
add a complete with message in case we need that
This commit is contained in:
@@ -35,6 +35,14 @@ func (e *Expector) Complete() ValidationFeedback {
|
||||
return e.ValidationFeedback
|
||||
}
|
||||
|
||||
func (e *Expector) CompleteWithMessage(message string) ValidationFeedback {
|
||||
e.Success = len(e.Errors()) == 0
|
||||
if !e.Success {
|
||||
e.Message = message
|
||||
}
|
||||
return e.ValidationFeedback
|
||||
}
|
||||
|
||||
func (e *Expector) Fail(message string) ValidationFeedback {
|
||||
e.Checks = append(e.Checks, NewCheck(message, false))
|
||||
return e.ValidationFeedback
|
||||
|
||||
Reference in New Issue
Block a user