From 4fcf7928f87598b9dc40084d2b6dc2e2c4a69dac Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 15 Oct 2016 18:59:17 +0200 Subject: Test the facebook preferences Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- tests/testpreferences.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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) -- cgit v1.2.3-70-g09d2