diff options
| author | Aleix Pol <aleixpol@kde.org> | 2015-10-21 01:52:09 (GMT) |
|---|---|---|
| committer | Aleix Pol <aleixpol@kde.org> | 2015-10-21 01:52:28 (GMT) |
| commit | bd88d35071e4057a6b63da88535e9283c7f8686a (patch) | |
| tree | beed8b9bca4a274aaed215974358db480177bc87 | |
| parent | 62890c733379e551cecdfea77707522bbd44389a (diff) | |
Include initial test for the UpdateModel
| -rw-r--r-- | libmuon/backends/DummyBackend/tests/DummyTest.cpp | 12 | ||||
| -rw-r--r-- | libmuon/backends/DummyBackend/tests/DummyTest.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/libmuon/backends/DummyBackend/tests/DummyTest.cpp b/libmuon/backends/DummyBackend/tests/DummyTest.cpp index 20e26ac..63b2a2d 100644 --- a/libmuon/backends/DummyBackend/tests/DummyTest.cpp +++ b/libmuon/backends/DummyBackend/tests/DummyTest.cpp @@ -19,6 +19,8 @@ ***************************************************************************/ #include "DummyTest.h" +#include <resources/ResourcesUpdatesModel.h> +#include <UpdateModel/UpdateModel.h> #include <modeltest.h> #include <resources/ResourcesModel.h> #include <resources/ResourcesProxyModel.h> @@ -164,3 +166,13 @@ void DummyTest::testReviewsModel() m.markUseful(0, false); QCOMPARE(ReviewsModel::UserChoice(m.data(m.index(0,0), ReviewsModel::UsefulChoice).toInt()), ReviewsModel::No); } + +void DummyTest::testUpdateModel() +{ + ResourcesUpdatesModel ruModel; + UpdateModel model; + model.setBackend(&ruModel); + + QCOMPARE(model.rowCount(), 2); + QCOMPARE(model.hasUpdates(), true); +} diff --git a/libmuon/backends/DummyBackend/tests/DummyTest.h b/libmuon/backends/DummyBackend/tests/DummyTest.h index a1c9401..3b288de 100644 --- a/libmuon/backends/DummyBackend/tests/DummyTest.h +++ b/libmuon/backends/DummyBackend/tests/DummyTest.h @@ -39,6 +39,7 @@ private slots: void testSort(); void testInstallAddons(); void testReviewsModel(); + void testUpdateModel(); private: AbstractResourcesBackend* m_appBackend; |
