diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2016-10-15 19:30:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-10-15 12:21:58 -0700 |
commit | 49e96e781696a1ba9d87915155c9df264966e72d (patch) | |
tree | 087c60579192a387cd3865b38898ddba13e8a63c | |
parent | 256d16a54067f9e4143ec9491de5abd56dbd1a4d (diff) | |
download | subsurface-49e96e781696a1ba9d87915155c9df264966e72d.tar.gz |
Tests for Proxy preferences
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | tests/testpreferences.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/testpreferences.cpp b/tests/testpreferences.cpp index 9f668896d..18141755f 100644 --- a/tests/testpreferences.cpp +++ b/tests/testpreferences.cpp @@ -280,6 +280,35 @@ void TestPreferences::testPreferences() TEST(geo->firstTaxonomyCategory(), TC_OCEAN); TEST(geo->secondTaxonomyCategory(), TC_COUNTRY); TEST(geo->thirdTaxonomyCategory(), TC_NONE); + + auto proxy = pref->proxy; + proxy->setType(2); + proxy->setPort(80); + proxy->setAuth((short) 5); + proxy->setHost("localhost"); + proxy->setUser("unknown"); + proxy->setPass("secret"); + + TEST(proxy->type(),2); + TEST(proxy->port(),80); + TEST(proxy->auth(),(short) 5); + TEST(proxy->host(),QStringLiteral("localhost")); + TEST(proxy->user(),QStringLiteral("unknown")); + TEST(proxy->pass(),QStringLiteral("secret")); + + proxy->setType(3); + proxy->setPort(8080); + proxy->setAuth((short) 6); + proxy->setHost("127.0.0.1"); + proxy->setUser("unknown_1"); + proxy->setPass("secret_1"); + + TEST(proxy->type(),3); + TEST(proxy->port(),8080); + TEST(proxy->auth(),(short) 6); + TEST(proxy->host(),QStringLiteral("localhost_1")); + TEST(proxy->user(),QStringLiteral("unknown_1")); + TEST(proxy->pass(),QStringLiteral("secret_1")); } QTEST_MAIN(TestPreferences) |