summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Soliverez <alvaro.soliverez@collabora.co.uk>2011-08-16 12:33:54 -0700
committerAlvaro Soliverez <alvaro.soliverez@collabora.co.uk>2011-08-16 12:34:36 -0700
commitf0a797f7788a21c68bb385a3396f39c2f0eee09e (patch)
tree35514560cfd62f82f29f61493e730813ef11c175
parenta7ebc535f00b1964d74cc069df8399ae8a39bc1e (diff)
Added more tests for AccountsModelItem
-rw-r--r--tests/dbus/accounts-model-accounts.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/dbus/accounts-model-accounts.cpp b/tests/dbus/accounts-model-accounts.cpp
index f4fa426..79e2513 100644
--- a/tests/dbus/accounts-model-accounts.cpp
+++ b/tests/dbus/accounts-model-accounts.cpp
@@ -127,6 +127,14 @@ void TestAccountsModelAccounts::onItemChanged()
QCOMPARE(accountItem->data(Tpy::AccountsModel::StreamedMediaVideoCallCapabilityRole).toBool(), account->capabilities().streamedMediaVideoCalls());
QCOMPARE(accountItem->data(Tpy::AccountsModel::StreamedMediaVideoCallWithAudioCapabilityRole).toBool(), account->capabilities().streamedMediaVideoCallsWithAudio());
QCOMPARE(accountItem->data(Tpy::AccountsModel::StreamedMediaUpgradeCallCapabilityRole).toBool(), account->capabilities().upgradingStreamedMediaCalls());
+
+ Tpy::ConnectionCapabilities connCaps = account->capabilities();
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::MediaCallCapabilityRole).toBool(), connCaps.mediaCalls());
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::AudioCallCapabilityRole).toBool(), connCaps.audioCalls());
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::VideoCallCapabilityRole).toBool(), connCaps.videoCalls());
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::VideoCallWithAudioCapabilityRole).toBool(), connCaps.videoCallsWithAudio());
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::UpgradeCallCapabilityRole).toBool(), connCaps.upgradingCalls());
+ QCOMPARE(accountItem->data(Tpy::AccountsModel::FileTransferCapabilityRole).toBool(), connCaps.fileTransfers());
}
void TestAccountsModelAccounts::initTestCase()
@@ -221,6 +229,9 @@ void TestAccountsModelAccounts::testBasics()
QVERIFY(connect(accountItem, SIGNAL(nicknameChanged(QString)),
SLOT(onItemChanged())));
+ QCOMPARE(accountItem->isPresenceSupported(0), false);
+ QCOMPARE(accountItem->isPresenceSupported(2), true);
+
// simulate that the account has a connection
Client::DBus::PropertiesInterface *accPropertiesInterface =
acc->interface<Client::DBus::PropertiesInterface>();