@@ -274,6 +274,15 @@ private Q_SLOTS:
274 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
274 QCOMPARE(launcherModel->rowCount(QModelIndex()), 1);
275 QCOMPARE(launcherModel->get(0)->appId(), QLatin1String("abs-icon"));
275 QCOMPARE(launcherModel->get(0)->appId(), QLatin1String("abs-icon"));
278+ void testGetUrlForAppId() {
279+ QCOMPARE(launcherModel->getUrlForAppId(QString()), QString());
280+ QCOMPARE(launcherModel->getUrlForAppId(""), QString());
281+ QCOMPARE(launcherModel->getUrlForAppId("no-name"), QString("application:///no-name.desktop"));
282+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good"), QString("appid://com.test.good/first-listed-app/current-user-version"));
283+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application"), QString("appid://com.test.good/application/current-user-version"));
284+ QCOMPARE(launcherModel->getUrlForAppId("com.test.good_application_1.2.3"), QString("appid://com.test.good/application/current-user-version"));
279QTEST_GUILESS_MAIN(LauncherModelTest)
288QTEST_GUILESS_MAIN(LauncherModelTest)