aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tst_qPrefFacebook.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_qPrefFacebook.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_qPrefFacebook.qml')
-rw-r--r--tests/tst_qPrefFacebook.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/tst_qPrefFacebook.qml b/tests/tst_qPrefFacebook.qml
index 721179772..24be306a7 100644
--- a/tests/tst_qPrefFacebook.qml
+++ b/tests/tst_qPrefFacebook.qml
@@ -18,4 +18,29 @@ TestCase {
PrefFacebook.user_id = "my user"
compare(PrefFacebook.user_id, "my user")
}
+
+ Item {
+ id: spyCatcher
+
+ property bool spy1 : false
+ property bool spy2 : false
+ property bool spy3 : false
+
+ Connections {
+ target: PrefFacebook
+ onAccess_tokenChanged: {spyCatcher.spy1 = true }
+ onAlbum_idChanged: {spyCatcher.spy2 = true }
+ onUser_idChanged: {spyCatcher.spy3 = true }
+ }
+ }
+
+ function test_signals() {
+ PrefFacebook.access_token = "qml"
+ PrefFacebook.album_id = "qml"
+ PrefFacebook.user_id = "qml"
+
+ compare(spyCatcher.spy1, true)
+ compare(spyCatcher.spy2, true)
+ compare(spyCatcher.spy3, true)
+ }
}