GODT-1205: "RCPT TO" does not contain all addressed from "CC"

This commit is contained in:
Alexander Bilyak
2021-09-06 21:13:37 +00:00
committed by Jakub Cuth
parent 91dcb2f773
commit 22d2bcc21d
11 changed files with 236 additions and 91 deletions

View File

@ -37,6 +37,7 @@ func SMTPActionsAuthFeatureContext(s *godog.Suite) {
s.Step(`^SMTP client sends message with bcc "([^"]*)"$`, smtpClientSendsMessageWithBCC)
s.Step(`^SMTP client "([^"]*)" sends message with bcc "([^"]*)"$`, smtpClientNamedSendsMessageWithBCC)
s.Step(`^SMTP client sends "([^"]*)"$`, smtpClientSendsCommand)
s.Step(`^SMTP client sends$`, smtpClientSendsCommandMultiline)
s.Step(`^SMTP client "([^"]*)" sends "([^"]*)"$`, smtpClientNamedSendsCommand)
}
@ -111,6 +112,9 @@ func smtpClientNamedSendsMessageWithBCC(clientID, bcc string, message *gherkin.D
func smtpClientSendsCommand(command string) error {
return smtpClientNamedSendsCommand("smtp", command)
}
func smtpClientSendsCommandMultiline(command *gherkin.DocString) error {
return smtpClientNamedSendsCommand("smtp", command.Content)
}
func smtpClientNamedSendsCommand(clientName, command string) error {
command = strings.ReplaceAll(command, "\\r", "\r")
command = strings.ReplaceAll(command, "\\n", "\n")