summaryrefslogtreecommitdiff
path: root/src/settings/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings/test')
-rw-r--r--src/settings/test/test_settings.cpp8
-rw-r--r--src/settings/test/test_settings.qrc10
2 files changed, 11 insertions, 7 deletions
diff --git a/src/settings/test/test_settings.cpp b/src/settings/test/test_settings.cpp
index babbcdb6..24bbf349 100644
--- a/src/settings/test/test_settings.cpp
+++ b/src/settings/test/test_settings.cpp
@@ -76,14 +76,16 @@ TEST(settings, Settings)
TEST(settings, SettingsDialog)
{
+ constexpr unsigned n_settings = 36; // there are 36 settings in total
MockSettings mockSettings;
// There are 4 groups in total, but General should not be calling beginGroup/endGroup
// beginGroup/endGroup are called twice: during the ctor and when accepted
EXPECT_CALL(mockSettings, beginGroup).Times(3 * 4);
EXPECT_CALL(mockSettings, endGroup).Times(3 * 4);
- // There are 35 settings in total, one of which is hidden and won't be set by the dialog
- EXPECT_CALL(mockSettings, value).Times(35 * 2).WillRepeatedly(ReturnArg<1>());
- EXPECT_CALL(mockSettings, setValue(_, _)).Times(33 + 34);
+ EXPECT_CALL(mockSettings, value).Times(n_settings * 2).WillRepeatedly(ReturnArg<1>());
+ // 1 setting is hidden and won't be set by the dialog
+ // save and reset will both call setValue on all non-hidden settings
+ EXPECT_CALL(mockSettings, setValue(_, _)).Times(n_settings * 2 - 3);
EXPECT_CALL(mockSettings, setValue(QStringEq("homepage"), QVariantEq("about:blank")));
// change setting
diff --git a/src/settings/test/test_settings.qrc b/src/settings/test/test_settings.qrc
index deaf088f..16e74fef 100644
--- a/src/settings/test/test_settings.qrc
+++ b/src/settings/test/test_settings.qrc
@@ -1,5 +1,7 @@
-<!DOCTYPE RCC><RCC version="1.0">
- <qresource>
- <file>rekonqrc</file>
- </qresource>
+<?xml version='1.0' encoding='utf-8' standalone='yes'?>
+<!DOCTYPE RCC>
+<RCC version="1.0">
+ <qresource prefix="/">
+ <file alias="rekonqrc">rekonqrc</file>
+ </qresource>
</RCC>