Fix device lookup on the tests
This commit is contained in:
parent
a0da8ba858
commit
acdd96c431
2 changed files with 12 additions and 2 deletions
|
@ -75,7 +75,12 @@ class PluginLoadTest : public QObject
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void testPlugins() {
|
void testPlugins() {
|
||||||
Device* d = mDaemon->devicesList().first();
|
Device* d = nullptr;
|
||||||
|
foreach(Device* id, mDaemon->devicesList()) {
|
||||||
|
if (id->isReachable())
|
||||||
|
d = id;
|
||||||
|
}
|
||||||
|
QVERIFY(d);
|
||||||
QVERIFY(d->isPaired());
|
QVERIFY(d->isPaired());
|
||||||
QVERIFY(d->isReachable());
|
QVERIFY(d->isReachable());
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,12 @@ class TestSendFile : public QObject
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void testSend() {
|
void testSend() {
|
||||||
Device* d = mDaemon->devicesList().first();
|
Device* d = nullptr;
|
||||||
|
foreach(Device* id, mDaemon->devicesList()) {
|
||||||
|
if (id->isReachable())
|
||||||
|
d = id;
|
||||||
|
}
|
||||||
|
QVERIFY(d);
|
||||||
QCOMPARE(d->isReachable(), true);
|
QCOMPARE(d->isReachable(), true);
|
||||||
QCOMPARE(d->isPaired(), true);
|
QCOMPARE(d->isPaired(), true);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue