From 05a053b65443b55787ae075fc4e99181673c2d56 Mon Sep 17 00:00:00 2001 From: aqua Date: Mon, 22 Aug 2022 10:06:00 +0300 Subject: Load plugins from AppLocalDataLocation by default --- src/settings/test/settings_mock.hpp | 11 ++++++++++- src/settings/test/test_settings.cpp | 16 ++++++++++++++++ src/settings/test/test_settingsdialog.cpp | 7 +++++++ 3 files changed, 33 insertions(+), 1 deletion(-) (limited to 'src/settings/test') diff --git a/src/settings/test/settings_mock.hpp b/src/settings/test/settings_mock.hpp index ec792ff5..bc3fbc2f 100644 --- a/src/settings/test/settings_mock.hpp +++ b/src/settings/test/settings_mock.hpp @@ -1,3 +1,10 @@ +/* ============================================================ + * The rekonq project + * ============================================================ + * SPDX-License-Identifier: GPL-3.0-only + * Copyright (C) 2022 aqua + * ============================================================ */ + #pragma once #include @@ -8,11 +15,13 @@ class MockSettings : public RekonqSettings { public: explicit MockSettings() : RekonqSettings(nullptr) {} - ~MockSettings() = default; + ~MockSettings() override = default; MOCK_METHOD(void, beginGroup, (const QString &), (override)); MOCK_METHOD(void, endGroup, (), (override)); MOCK_METHOD(void, setValue, (const QString &, const QVariant &), (override)); MOCK_METHOD(QVariant, value, (const QString &, const QVariant &), (const, override)); + + MOCK_METHOD(QString, filePath, (), (const, override)); }; diff --git a/src/settings/test/test_settings.cpp b/src/settings/test/test_settings.cpp index 72582bc7..2ca5ba1a 100644 --- a/src/settings/test/test_settings.cpp +++ b/src/settings/test/test_settings.cpp @@ -1,4 +1,13 @@ +/* ============================================================ + * The rekonq project + * ============================================================ + * SPDX-License-Identifier: GPL-3.0-only + * Copyright (C) 2022 aqua + * ============================================================ */ + #include +#include +#include #include #include @@ -23,6 +32,13 @@ TEST(settings, getFont) EXPECT_EQ(fixed.styleHint(), QFont::Monospace) << qUtf8Printable(fixed.toString()); } +TEST(settings, settingsPath) +{ + const auto path = QDir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)).filePath("rekonqrc"); + EXPECT_FALSE(path.isEmpty()); + EXPECT_TRUE(path.endsWith("rekonqrc")); +} + TEST(settings, Settings) { Settings settings(settingsFile); diff --git a/src/settings/test/test_settingsdialog.cpp b/src/settings/test/test_settingsdialog.cpp index b70c6dda..a50cf307 100644 --- a/src/settings/test/test_settingsdialog.cpp +++ b/src/settings/test/test_settingsdialog.cpp @@ -1,3 +1,10 @@ +/* ============================================================ + * The rekonq project + * ============================================================ + * SPDX-License-Identifier: GPL-3.0-only + * Copyright (C) 2022 aqua + * ============================================================ */ + #include "../settingsdialog.h" #include "settings_mock.hpp" #include -- cgit v1.2.1