summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-07-28 19:11:28 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-30 07:43:22 -0700
commitd3f3d82abdaabebf5a8c83a57cc6b9e0b7aab1de (patch)
treec76555820485da88aeaa2c93cbb0746748e83d75 /tests
parent7acd489891883c5530d184bc6c6b11dd64b00c34 (diff)
downloadsubsurface-d3f3d82abdaabebf5a8c83a57cc6b9e0b7aab1de.tar.gz
tests: add Proxy qml test cases
Add tst_qPrefProxy qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/tst_qPrefProxy.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/tst_qPrefProxy.qml b/tests/tst_qPrefProxy.qml
new file mode 100644
index 000000000..1cd84ca8f
--- /dev/null
+++ b/tests/tst_qPrefProxy.qml
@@ -0,0 +1,42 @@
+// SPDX-License-Identifier: GPL-2.0
+import QtQuick 2.6
+import QtTest 1.2
+import org.subsurfacedivelog.mobile 1.0
+
+TestCase {
+ name: "qPrefProxy"
+
+ SsrfProxyPrefs {
+ id: tst
+ }
+
+ SsrfPrefs {
+ id: prefs
+ }
+
+ function test_variables() {
+ var x1 = tst.proxy_auth
+ tst.proxy_auth = true
+ compare(tst.proxy_auth, true)
+
+ var x2 = tst.proxy_host
+ tst.proxy_host = "my host"
+ compare(tst.proxy_host, "my host")
+
+ var x3 = tst.proxy_pass
+ tst.proxy_pass = "my pass"
+ compare(tst.proxy_pass, "my pass")
+
+ var x3 = tst.proxy_port
+ tst.proxy_port = 544
+ compare(tst.proxy_port, 544)
+
+ var x5 = tst.proxy_type
+ tst.proxy_type = 3
+ compare(tst.proxy_type, 3)
+
+ var x3 = tst.proxy_user
+ tst.proxy_user = "my user"
+ compare(tst.proxy_user, "my user")
+ }
+}