summaryrefslogtreecommitdiffstats
path: root/tests/auto/oauth1/tst_oauth1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/oauth1/tst_oauth1.cpp')
-rw-r--r--tests/auto/oauth1/tst_oauth1.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/auto/oauth1/tst_oauth1.cpp b/tests/auto/oauth1/tst_oauth1.cpp
index 50822bd..7bfc628 100644
--- a/tests/auto/oauth1/tst_oauth1.cpp
+++ b/tests/auto/oauth1/tst_oauth1.cpp
@@ -145,6 +145,7 @@ public Q_SLOTS:
private Q_SLOTS:
void clientIdentifierSignal();
void clientSharedSecretSignal();
+ void tokenSignal();
void tokenSecretSignal();
void temporaryCredentialsUrlSignal();
void temporaryTokenCredentialsUrlSignal();
@@ -252,7 +253,7 @@ void tst_OAuth1::clientSharedSecretSignal()
PropertyTester::run(&QOAuth1::clientSharedSecretChanged, setters);
}
-void tst_OAuth1::tokenSecretSignal()
+void tst_OAuth1::tokenSignal()
{
using PropertyTester = PropertyTester<QString>;
PropertyTester::SetterFunctions setters {
@@ -268,6 +269,22 @@ void tst_OAuth1::tokenSecretSignal()
PropertyTester::run(&QOAuth1::tokenChanged, setters);
}
+void tst_OAuth1::tokenSecretSignal()
+{
+ using PropertyTester = PropertyTester<QString>;
+ PropertyTester::SetterFunctions setters {
+ [](QString *expectedValue, QOAuth1 *object) {
+ *expectedValue = "setTokenSecret";
+ object->setTokenSecret(*expectedValue);
+ },
+ [](QString *expectedValue, QOAuth1 *object) {
+ *expectedValue = "setTokenCredentials";
+ object->setTokenCredentials(qMakePair(QString(), *expectedValue));
+ }
+ };
+ PropertyTester::run(&QOAuth1::tokenSecretChanged, setters);
+}
+
void tst_OAuth1::temporaryCredentialsUrlSignal()
{
using PropertyTester = PropertyTester<QUrl>;