Fix tests
Ensure the loopback device is paired
This commit is contained in:
parent
a9d2840664
commit
fc074c8ec8
2 changed files with 10 additions and 3 deletions
|
@ -77,8 +77,10 @@ class PluginLoadTest : public QObject
|
|||
void testPlugins() {
|
||||
Device* d = nullptr;
|
||||
foreach(Device* id, mDaemon->devicesList()) {
|
||||
if (id->isReachable())
|
||||
if (id->isReachable()) {
|
||||
id->requestPair();
|
||||
d = id;
|
||||
}
|
||||
}
|
||||
QVERIFY(d);
|
||||
QVERIFY(d->isPaired());
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <QTest>
|
||||
#include <QTemporaryFile>
|
||||
#include <QSignalSpy>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include <KIO/AccessManager>
|
||||
|
||||
|
@ -68,14 +69,18 @@ class TestSendFile : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TestSendFile() : mDaemon(new TestDaemon) {}
|
||||
TestSendFile() : mDaemon(new TestDaemon) {
|
||||
QStandardPaths::setTestModeEnabled(true);
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
void testSend() {
|
||||
Device* d = nullptr;
|
||||
foreach(Device* id, mDaemon->devicesList()) {
|
||||
if (id->isReachable())
|
||||
if (id->isReachable()) {
|
||||
id->requestPair();
|
||||
d = id;
|
||||
}
|
||||
}
|
||||
QVERIFY(d);
|
||||
QCOMPARE(d->isReachable(), true);
|
||||
|
|
Loading…
Reference in a new issue