From a5effc3b48826ad724be3604013be29cce22502d Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Thu, 26 May 2011 18:56:24 +0200 Subject: [PATCH] fix up the test --- tests/plasmoidpackagetest.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/plasmoidpackagetest.cpp b/tests/plasmoidpackagetest.cpp index 90039a4fd..c7f76b199 100644 --- a/tests/plasmoidpackagetest.cpp +++ b/tests/plasmoidpackagetest.cpp @@ -307,12 +307,12 @@ void PlasmoidPackageTest::createAndInstallPackage() QString plasmoid("plasmoid_to_package"); createTestPackage(plasmoid); - QString packagePath = mPackageRoot + '/' + "package.zip"; - Plasma::PackageMetadata metadata( - QString(KDESRCDIR) + "/packagemetadatatest.desktop"); - QVERIFY(Plasma::Package::createPackage(metadata, - mPackageRoot + '/' + plasmoid + "/contents", - packagePath)); + const QString packagePath = mPackageRoot + '/' + "testpackage.plasmoid"; + + KZip creator(packagePath); + creator.addLocalDirectory(packagePath, "."); + creator.close(); + QVERIFY(QFile::exists(packagePath)); KZip package(packagePath); @@ -328,7 +328,8 @@ void PlasmoidPackageTest::createAndInstallPackage() QVERIFY(contents->entry("code")); QVERIFY(contents->entry("images")); - QVERIFY(Plasma::Package::installPackage(packagePath, mPackageRoot, "plasma-applet-")); + Plasma::PackageStructure::Ptr plasmoidStructure(Plasma::Applet::packageStructure()); + QVERIFY(plasmoidStructure->installPackage(packagePath, mPackageRoot)); QString installedPackage = mPackageRoot + "/test"; QVERIFY(QFile::exists(installedPackage));