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 bff373d5 authored by Elvis Angelaccio's avatar Elvis Angelaccio

Fix PlacesItemModelTest::testDefaultViewProperties()

The test was assuming that global view properties are off by default,
which is no longer true after d6c086ad.
parent 303cd174
......@@ -29,6 +29,7 @@
#include <KAboutData>
#include <KFilePlacesModel>
#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<QByteArray>, 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()
......
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