summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2016-10-15 18:59:17 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-10-15 12:21:20 -0700
commit4fcf7928f87598b9dc40084d2b6dc2e2c4a69dac (patch)
tree09cd25e2f67f6f84555ce02e6a1013c196f5c200
parentc5c82b5d11d151b5f0beb5c1258b569c1f56e75b (diff)
downloadsubsurface-4fcf7928f87598b9dc40084d2b6dc2e2c4a69dac.tar.gz
Test the facebook preferences
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--tests/testpreferences.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp
index d1d0012fa..e9ea71936 100644
--- a/tests/testpreferences.cpp
+++ b/tests/testpreferences.cpp
@@ -231,6 +231,22 @@ void TestPreferences::testPreferences()
TEST(pp->pheThreshold(), 5.0);
TEST(pp->po2Threshold(), 6.0);
+ auto fb = pref->facebook;
+ fb->setAccessToken("rand-access-token");
+ fb->setUserId("tomaz-user-id");
+ fb->setAlbumId("album-id");
+
+ TEST(fb->accessToken(),QStringLiteral("rand-access-token"));
+ TEST(fb->userId(), QStringLiteral("tomaz-user-id"));
+ TEST(fb->albumId(), QStringLiteral("album-id"));
+
+ fb->setAccessToken("rand-access-token-2");
+ fb->setUserId("tomaz-user-id-2");
+ fb->setAlbumId("album-id-2");
+
+ TEST(fb->accessToken(),QStringLiteral("rand-access-token-2"));
+ TEST(fb->userId(), QStringLiteral("tomaz-user-id-2"));
+ TEST(fb->albumId(), QStringLiteral("album-id-2"));
}
QTEST_MAIN(TestPreferences)