1
0

GODT-1076 Fix UIDPLUS response for importing existing message

This commit is contained in:
Michal Horejsek
2021-02-26 12:30:54 +01:00
parent a94c8a943f
commit 479b951c50
4 changed files with 42 additions and 3 deletions

View File

@ -19,6 +19,7 @@ package tests
import (
"strconv"
"strings"
"time"
"github.com/cucumber/godog"
@ -47,9 +48,12 @@ func imapResponseIs(expectedResponse string) error {
func imapResponseNamedIs(clientID, expectedResponse string) error {
res := ctx.GetIMAPLastResponse(clientID)
if expectedResponse == "OK" {
switch {
case expectedResponse == "OK":
res.AssertOK()
} else {
case strings.HasPrefix(expectedResponse, "OK"):
res.AssertResult(expectedResponse)
default:
res.AssertError(expectedResponse)
}
return ctx.GetTestingError()