1
0

Replace old date to not crash Apple Mail

This commit is contained in:
Michal Horejsek
2020-12-07 13:22:09 +01:00
parent 2de202ca02
commit 40db822450
7 changed files with 69 additions and 1 deletions

View File

@ -32,6 +32,8 @@ func IMAPChecksFeatureContext(s *godog.Suite) {
s.Step(`^IMAP response to "([^"]*)" contains "([^"]*)"$`, imapResponseNamedContains)
s.Step(`^IMAP response has (\d+) message(?:s)?$`, imapResponseHasNumberOfMessages)
s.Step(`^IMAP response to "([^"]*)" has (\d+) message(?:s)?$`, imapResponseNamedHasNumberOfMessages)
s.Step(`^IMAP response does not contain "([^"]*)"$`, imapResponseDoesNotContain)
s.Step(`^IMAP response to "([^"]*)" does not contain "([^"]*)"$`, imapResponseNamedDoesNotContain)
s.Step(`^IMAP client receives update marking message seq "([^"]*)" as read within (\d+) seconds$`, imapClientReceivesUpdateMarkingMessageSeqAsReadWithin)
s.Step(`^IMAP client "([^"]*)" receives update marking message seq "([^"]*)" as read within (\d+) seconds$`, imapClientNamedReceivesUpdateMarkingMessageSeqAsReadWithin)
s.Step(`^IMAP client receives update marking message seq "([^"]*)" as unread within (\d+) seconds$`, imapClientReceivesUpdateMarkingMessageSeqAsUnreadWithin)
@ -73,6 +75,16 @@ func imapResponseNamedHasNumberOfMessages(clientID string, expectedCount int) er
return ctx.GetTestingError()
}
func imapResponseDoesNotContain(notExpectedResponse string) error {
return imapResponseNamedDoesNotContain("imap", notExpectedResponse)
}
func imapResponseNamedDoesNotContain(clientID, notExpectedResponse string) error {
res := ctx.GetIMAPLastResponse(clientID)
res.AssertNotSections(notExpectedResponse)
return ctx.GetTestingError()
}
func imapClientReceivesUpdateMarkingMessageSeqAsReadWithin(messageSeq string, seconds int) error {
return imapClientNamedReceivesUpdateMarkingMessageSeqAsReadWithin("imap", messageSeq, seconds)
}