mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:13:23 +00:00
tests: add Facebook qml test cases
Add tst_qPrefFacebook qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
parent
711b96a143
commit
8da7ddc64b
1 changed files with 24 additions and 0 deletions
24
tests/tst_qPrefFacebook.qml
Normal file
24
tests/tst_qPrefFacebook.qml
Normal file
|
@ -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")
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue