summaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefLocationService.qml
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-28 12:33:47 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-11 17:25:00 -0700
commit848d2779519b365ba3cfd17838680f5b0cf6eb32 (patch)
tree6a6de26e370994fd018b37591a223b36dfd2f122 /tests/tst_qPrefLocationService.qml
parentc01d9f60c14ec9ee58892504e9f5c346dbb24e7e (diff)
downloadsubsurface-848d2779519b365ba3cfd17838680f5b0cf6eb32.tar.gz
tests: add signal test to call tst_qPref*qml
Add signal testing of all variables Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests/tst_qPrefLocationService.qml')
-rw-r--r--tests/tst_qPrefLocationService.qml21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/tst_qPrefLocationService.qml b/tests/tst_qPrefLocationService.qml
index 61cbc9827..9da5fcfb3 100644
--- a/tests/tst_qPrefLocationService.qml
+++ b/tests/tst_qPrefLocationService.qml
@@ -14,4 +14,25 @@ TestCase {
PrefLocationService.time_threshold = 12
compare(PrefLocationService.time_threshold , 12)
}
+
+ Item {
+ id: spyCatcher
+
+ property bool spy1 : false
+ property bool spy2 : false
+
+ Connections {
+ target: PrefLocationService
+ onDistance_thresholdChanged: {spyCatcher.spy1 = true }
+ onTime_thresholdChanged: {spyCatcher.spy2 = true }
+ }
+ }
+
+ function test_signals() {
+ PrefLocationService.distance_threshold = -123
+ PrefLocationService.time_threshold = -12
+
+ compare(spyCatcher.spy1, true)
+ compare(spyCatcher.spy2, true)
+ }
}