Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ad78c785 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Include a fetchChangelog test

parent 9a1a124e
......@@ -66,6 +66,30 @@ private Q_SLOTS:
}
}
void testInformation()
{
ResourcesUpdatesModel* rum = new ResourcesUpdatesModel(this);
new ModelTest(rum, rum);
UpdateModel* m = new UpdateModel(this);
new ModelTest(m, m);
m->setBackend(rum);
rum->prepare();
QSignalSpy spySetup(m_appBackend->backendUpdater(), &AbstractBackendUpdater::progressingChanged);
QVERIFY(!m_appBackend->backendUpdater()->isProgressing() || spySetup.wait());
QCOMPARE(m_appBackend->updatesCount(), m_appBackend->property("startElements").toInt()*2/3);
QCOMPARE(m->hasUpdates(), true);
QCOMPARE(m->index(0,0).data(UpdateModel::ChangelogRole).toString(), {});
QSignalSpy spy(m, &QAbstractItemModel::dataChanged);
m->fetchChangelog(0);
QVERIFY(spy.count() || spy.wait());
QCOMPARE(spy.count(), 1);
delete m;
}
void testUpdate()
{
ResourcesUpdatesModel* rum = new ResourcesUpdatesModel(this);
......
Markdown is supported
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