Commit dd85945b authored by Volker Krause's avatar Volker Krause
Browse files

Change to last remaining tests to import trough ApplicationController

Importing via the PkPass manager is going away.
parent 1876a894
......@@ -107,11 +107,11 @@ private Q_SLOTS:
QVERIFY(mgr.batches().empty());
const auto passId = QStringLiteral("pass.booking.kde.org/MTIzNA==");
passMgr.importPass(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v1.pkpass")));
ctrl.importFromUrl(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v1.pkpass")));
QCOMPARE(addSpy.size(), 1);
QVERIFY(updateSpy.isEmpty());
passMgr.importPass(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v2.pkpass")));
ctrl.importFromUrl(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v2.pkpass")));
QCOMPARE(addSpy.size(), 1);
QCOMPARE(updateSpy.size(), 1);
}
......
......@@ -107,7 +107,7 @@ private Q_SLOTS:
QCOMPARE(model.rowCount(), 1);
QCOMPARE(model.index(0, 0).data(TimelineModel::ElementTypeRole), TimelineElement::TodayMarker);
mgr.importPass(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v1.pkpass")));
ctrl.importFromUrl(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v1.pkpass")));
QCOMPARE(insertSpy.size(), 1);
QCOMPARE(insertSpy.at(0).at(1).toInt(), 0);
QCOMPARE(insertSpy.at(0).at(2).toInt(), 0);
......@@ -115,7 +115,7 @@ private Q_SLOTS:
QCOMPARE(model.rowCount(), 2);
QCOMPARE(model.index(0, 0).data(TimelineModel::ElementTypeRole), TimelineElement::Flight);
mgr.importPass(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v2.pkpass")));
ctrl.importFromUrl(QUrl::fromLocalFile(QLatin1String(SOURCE_DIR "/data/boardingpass-v2.pkpass")));
QCOMPARE(insertSpy.size(), 1);
QCOMPARE(updateSpy.size(), 1);
QCOMPARE(updateSpy.at(0).at(0).toModelIndex().row(), 0);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment