~tiagosh/telephony-service/ussd

« back to all changes in this revision

Viewing changes to handler/tests/HandlerTest.cpp

Merge the changes for multiple account support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
{
61
61
    QString callerId("1234567");
62
62
    QSignalSpy callReceivedSpy(MockController::instance(), SIGNAL(callReceived(QString)));
63
 
    HandlerController::instance()->startCall(callerId);
 
63
    // FIXME: add support for multiple accounts
 
64
    HandlerController::instance()->startCall(callerId, TelepathyHelper::instance()->accountId());
64
65
    QTRY_COMPARE(callReceivedSpy.count(), 1);
65
66
    QCOMPARE(callReceivedSpy.first().first().toString(), callerId);
66
67
 
185
186
    QString recipient("22222222");
186
187
    QString message("Hello, world!");
187
188
    QSignalSpy messageSentSpy(MockController::instance(), SIGNAL(messageSent(QString,QVariantMap)));
188
 
    HandlerController::instance()->sendMessage(recipient, message);
 
189
    // FIXME: add support for multiple accounts
 
190
    HandlerController::instance()->sendMessage(recipient, message, TelepathyHelper::instance()->accountId());
189
191
    QTRY_COMPARE(messageSentSpy.count(), 1);
190
192
    QString sentMessage = messageSentSpy.first().first().toString();
191
193
    QVariantMap messageProperties = messageSentSpy.first().last().value<QVariantMap>();