mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-28 02:36:08 +08:00
get the latest message from the mailbox. It fixes the issue PLT-6176 (#6005)
This commit is contained in:
committed by
Corey Hulen
parent
1bd19f006d
commit
f7b39caf31
+2
-2
@@ -1053,10 +1053,10 @@ func TestEmailMention(t *testing.T) {
|
||||
t.Log("No email was received, maybe due load on the server. Disabling this verification")
|
||||
}
|
||||
if err == nil && len(resultsMailbox) > 0 {
|
||||
if !strings.ContainsAny(resultsMailbox[0].To[0], th.BasicUser2.Email) {
|
||||
if !strings.ContainsAny(resultsMailbox[len(resultsMailbox)-1].To[0], th.BasicUser2.Email) {
|
||||
t.Fatal("Wrong To recipient")
|
||||
} else {
|
||||
if resultsEmail, err := utils.GetMessageFromMailbox(th.BasicUser2.Email, resultsMailbox[0].ID); err == nil {
|
||||
if resultsEmail, err := utils.GetMessageFromMailbox(th.BasicUser2.Email, resultsMailbox[len(resultsMailbox)-1].ID); err == nil {
|
||||
if !strings.Contains(resultsEmail.Body.Text, post1.Message) {
|
||||
t.Log(resultsEmail.Body.Text)
|
||||
t.Fatal("Received wrong Message")
|
||||
|
||||
Reference in New Issue
Block a user