Fix installation test

This commit is contained in:
Andrea Maria Piana 2023-04-27 17:39:59 +01:00
parent a8fe8edd45
commit 46bac20260
1 changed files with 8 additions and 7 deletions

View File

@ -134,17 +134,18 @@ func (s *MessengerInstallationSuite) TestReceiveInstallation() {
s.Require().NoError(err) s.Require().NoError(err)
// Wait for the message to reach its destination // Wait for the message to reach its destination
response, err = WaitOnMessengerResponse( _, err = WaitOnMessengerResponse(
theirMessenger, theirMessenger,
func(r *MessengerResponse) bool { return len(r.Contacts) == 1 && r.Contacts[0].ID == contact.ID }, func(r *MessengerResponse) bool {
return len(r.Contacts) == 1 &&
r.Contacts[0].ID == contact.ID &&
// Make sure lastupdated is **not** synced
actualContact.LastUpdated == 0 &&
r.Contacts[0].DisplayName == "display-name"
},
"contact not received", "contact not received",
) )
s.Require().NoError(err) s.Require().NoError(err)
actualContact = response.Contacts[0]
s.Require().Equal(contact.ID, actualContact.ID)
// Make sure lastupdated is **not** synced
s.Require().Equal(uint64(0), actualContact.LastUpdated)
s.Require().Equal("display-name", actualContact.DisplayName)
chat := CreatePublicChat(statusChatID, s.m.transport) chat := CreatePublicChat(statusChatID, s.m.transport)
err = s.m.SaveChat(chat) err = s.m.SaveChat(chat)