From 8da7ddc64badd09e309e39ed79f4b6821d84454e Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 23 Jul 2018 18:54:22 +0200 Subject: tests: add Facebook qml test cases Add tst_qPrefFacebook qml file to test C++ qml connection Signed-off-by: Jan Iversen --- tests/tst_qPrefFacebook.qml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/tst_qPrefFacebook.qml (limited to 'tests') diff --git a/tests/tst_qPrefFacebook.qml b/tests/tst_qPrefFacebook.qml new file mode 100644 index 000000000..a56c6e685 --- /dev/null +++ b/tests/tst_qPrefFacebook.qml @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +import QtQuick 2.6 +import QtTest 1.2 +import org.subsurfacedivelog.mobile 1.0 + +TestCase { + name: "qPrefFacebook" + + SsrfFacebookPrefs { + id: facebook + } + + function test_variables() { + var x1 = facebook.access_token + facebook.access_token = "my token" + compare(facebook.access_token, "my token") + var x2 = facebook.album_id + facebook.album_id = "my album" + compare(facebook.album_id, "my album") + var x1 = facebook.user_id + facebook.user_id = "my user" + compare(facebook.user_id, "my user") + } +} -- cgit v1.2.3-70-g09d2