diff options
author | Olli Salli <ollisal@gmail.com> | 2010-12-19 19:35:21 +0200 |
---|---|---|
committer | Olli Salli <ollisal@gmail.com> | 2010-12-19 19:35:21 +0200 |
commit | c781044b64b4abd4ed67ada73e4ffc62657318dd (patch) | |
tree | e6e1b12328a1b608f55a2bc9b212a5488d4e1422 | |
parent | 90763ff7b2f677dd2f40e403137623e1432031cd (diff) |
TestChanBasics: Test that the Channel invalidates itself with a reasonable error
-rw-r--r-- | tests/dbus/chan-basics.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/dbus/chan-basics.cpp b/tests/dbus/chan-basics.cpp index 2c67944f..f82ffd65 100644 --- a/tests/dbus/chan-basics.cpp +++ b/tests/dbus/chan-basics.cpp @@ -364,9 +364,17 @@ void TestChanBasics::cleanupTestCase() } } - if (mConnService != 0) { - g_object_unref(mConnService); - mConnService = 0; + if (mChan) { + if (mChan->isValid()) { + QVERIFY(connect(mChan.data(), + SIGNAL(invalidated(Tp::DBusProxy *, + const QString &, const QString &)), + SLOT(expectInvalidated(QString)))); + QCOMPARE(mLoop->exec(), 0); + } + + QVERIFY(mChan->invalidationReason() == TP_QT4_ERROR_CANCELLED || + mChan->invalidationReason() == TP_QT4_ERROR_ORPHANED); } cleanupTestCaseImpl(); |