~ci-train-bot/history-service/history-service-ubuntu-zesty-2629

« back to all changes in this revision

Viewing changes to tests/libhistoryservice/ThreadTest.cpp

  • Committer: Bileto Bot
  • Author(s): Gustavo Pichorim Boiko
  • Date: 2016-11-30 15:13:58 UTC
  • mfrom: (230.2.23 staging)
  • Revision ID: ci-train-bot@canonical.com-20161130151358-jy3mqj0ir0b6ncxe
Improve group chat support.

Approved by: Roberto Mier Escandón , Tiago Salem Herrmann

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
        break;
103
103
    }
104
104
 
105
 
    History::Thread threadItem(accountId, threadId, type, participantsFromIdentifiers(accountId, participants), event, count, unreadCount);
 
105
    History::Thread threadItem(accountId, threadId, type, participantsFromIdentifiers(accountId, participants), event.timestamp(), event, count, unreadCount);
106
106
    QCOMPARE(threadItem.accountId(), accountId);
107
107
    QCOMPARE(threadItem.threadId(), threadId);
108
108
    QCOMPARE(threadItem.type(), type);
109
109
    QCOMPARE(threadItem.participants().identifiers(), participants);
 
110
    QCOMPARE(threadItem.timestamp(), event.timestamp());
110
111
    QCOMPARE(threadItem.lastEvent(), event);
111
112
    QCOMPARE(threadItem.count(), count);
112
113
    QCOMPARE(threadItem.unreadCount(), unreadCount);
172
173
    QCOMPARE(thread.threadId(), threadId);
173
174
    QCOMPARE(thread.type(), type);
174
175
    QCOMPARE(thread.participants().identifiers(), participants);
 
176
    QCOMPARE(thread.timestamp(), event.timestamp());
175
177
    QCOMPARE(thread.count(), count);
176
178
    QCOMPARE(thread.unreadCount(), unreadCount);
177
179
    QVERIFY(thread.lastEvent() == event);
229
231
        break;
230
232
    }
231
233
 
232
 
    History::Thread threadItem(accountId, threadId, type, participantsFromIdentifiers(accountId, participants), event, count, unreadCount);
 
234
    History::Thread threadItem(accountId, threadId, type, participantsFromIdentifiers(accountId, participants), event.timestamp(), event, count, unreadCount);
233
235
    QVariantMap properties = threadItem.properties();
234
236
    QCOMPARE(properties[History::FieldAccountId].toString(), accountId);
235
237
    QCOMPARE(properties[History::FieldThreadId].toString(), threadId);