From bff373d598c031cb19bac222f90527d4c4c3d567 Mon Sep 17 00:00:00 2001 From: Elvis Angelaccio Date: Wed, 20 Mar 2019 21:34:37 +0100 Subject: [PATCH] Fix PlacesItemModelTest::testDefaultViewProperties() The test was assuming that global view properties are off by default, which is no longer true after d6c086ad04. --- src/tests/placesitemmodeltest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tests/placesitemmodeltest.cpp b/src/tests/placesitemmodeltest.cpp index 40ee47cbc9..fac0931a6c 100644 --- a/src/tests/placesitemmodeltest.cpp +++ b/src/tests/placesitemmodeltest.cpp @@ -29,6 +29,7 @@ #include #include +#include "dolphin_generalsettings.h" #include "panels/places/placesitemmodel.h" #include "panels/places/placesitem.h" #include "views/viewproperties.h" @@ -475,10 +476,18 @@ void PlacesItemModelTest::testDefaultViewProperties() QFETCH(bool, expectedPreviewShow); QFETCH(QList, expectedVisibleRole); + // In order to test the default view properties, turn off the global view properties. + GeneralSettings* settings = GeneralSettings::self(); + settings->setGlobalViewProps(false); + settings->save(); + ViewProperties properties(KFilePlacesModel::convertedUrl(url)); QCOMPARE(properties.viewMode(), expectedViewMode); QCOMPARE(properties.previewsShown(), expectedPreviewShow); QCOMPARE(properties.visibleRoles(), expectedVisibleRole); + + settings->setGlobalViewProps(true); + settings->save(); } void PlacesItemModelTest::testClear()