diff options
Diffstat (limited to 'tests/tst_qPrefCloudStorage.qml')
-rw-r--r-- | tests/tst_qPrefCloudStorage.qml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/tests/tst_qPrefCloudStorage.qml b/tests/tst_qPrefCloudStorage.qml index 8d58c7277..f2341218d 100644 --- a/tests/tst_qPrefCloudStorage.qml +++ b/tests/tst_qPrefCloudStorage.qml @@ -51,4 +51,57 @@ TestCase { PrefCloudStorage.userid = "my user" compare(PrefCloudStorage.userid, "my user") } + + Item { + id: spyCatcher + + property bool spy1 : false + property bool spy3 : false + property bool spy4 : false + property bool spy5 : false + property bool spy6 : false + property bool spy7 : false + property bool spy8 : false + property bool spy9 : false + property bool spy10 : false + property bool spy11 : false + + Connections { + target: PrefCloudStorage + onCloud_base_urlChanged: {spyCatcher.spy1 = true } + onCloud_storage_emailChanged: {spyCatcher.spy3 = true } + onCloud_storage_email_encodedChanged: {spyCatcher.spy4 = true } + onCloud_storage_passwordChanged: {spyCatcher.spy5 = true } + onCloud_storage_pinChanged: {spyCatcher.spy6 = true } + onCloud_timeoutChanged: {spyCatcher.spy7 = true } + onCloud_verification_statusChanged: {spyCatcher.spy8 = true } + onSave_password_localChanged: {spyCatcher.spy9 = true } + onSave_userid_localChanged: {spyCatcher.spy10 = true } + onUseridChanged: {spyCatcher.spy11 = true } + } + } + + function test_signals() { + PrefCloudStorage.cloud_base_url = "qml" + PrefCloudStorage.cloud_storage_email = "qml" + PrefCloudStorage.cloud_storage_email_encoded = "qml" + PrefCloudStorage.cloud_storage_password = "qml" + PrefCloudStorage.cloud_storage_pin = "qml" + PrefCloudStorage.cloud_timeout = 18 + PrefCloudStorage.cloud_verification_status = 2 + PrefCloudStorage.save_password_local = ! PrefCloudStorage.save_password_local + PrefCloudStorage.save_userid_local = ! PrefCloudStorage.save_userid_local + PrefCloudStorage.userid = "qml" + + compare(spyCatcher.spy1, true) + compare(spyCatcher.spy3, true) + compare(spyCatcher.spy4, true) + compare(spyCatcher.spy5, true) + compare(spyCatcher.spy6, true) + compare(spyCatcher.spy7, true) + compare(spyCatcher.spy8, true) + compare(spyCatcher.spy9, true) + compare(spyCatcher.spy10, true) + compare(spyCatcher.spy11, true) + } } |