summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-05-13 09:00:55 +0200
committerMontel Laurent <[email protected]>2015-05-13 09:00:55 +0200
commitd4a0c3de543ba709850c91fd272133fc97c312b2 (patch)
tree0f8ebc73a143bbefbd9309a96e169d322f1703ac
parent52598d7c52b2150315795b72ee8a3390f9b0f015 (diff)
Add more autotest
-rw-r--r--pimcommon/gravatar/autotests/gravatarresolvurljobtest.cpp20
-rw-r--r--pimcommon/gravatar/autotests/gravatarresolvurljobtest.h1
2 files changed, 21 insertions, 0 deletions
diff --git a/pimcommon/gravatar/autotests/gravatarresolvurljobtest.cpp b/pimcommon/gravatar/autotests/gravatarresolvurljobtest.cpp
index f516477..9d1a33c 100644
--- a/pimcommon/gravatar/autotests/gravatarresolvurljobtest.cpp
+++ b/pimcommon/gravatar/autotests/gravatarresolvurljobtest.cpp
@@ -38,6 +38,26 @@ void GravatarResolvUrlJobTest::shouldHaveDefaultValue()
QCOMPARE(job.hasGravatar(), false);
QCOMPARE(job.pixmap().isNull(), true);
QCOMPARE(job.useDefaultPixmap(), false);
+ QCOMPARE(job.useCache(), false);
+}
+
+void GravatarResolvUrlJobTest::shouldChangeValue()
+{
+ PimCommon::GravatarResolvUrlJob job;
+ bool useCache = true;
+ job.setUseCache(useCache);
+ QCOMPARE(job.useCache(), useCache);
+ useCache = false;
+ job.setUseCache(useCache);
+ QCOMPARE(job.useCache(), useCache);
+
+ bool useDefaultPixmap = true;
+ job.setUseDefaultPixmap(useDefaultPixmap);
+ QCOMPARE(job.useDefaultPixmap(), useDefaultPixmap );
+
+ useDefaultPixmap = false;
+ job.setUseDefaultPixmap(useDefaultPixmap);
+ QCOMPARE(job.useDefaultPixmap(), useDefaultPixmap );
}
void GravatarResolvUrlJobTest::shouldChangeSize()
diff --git a/pimcommon/gravatar/autotests/gravatarresolvurljobtest.h b/pimcommon/gravatar/autotests/gravatarresolvurljobtest.h
index ca42a30..6317f81 100644
--- a/pimcommon/gravatar/autotests/gravatarresolvurljobtest.h
+++ b/pimcommon/gravatar/autotests/gravatarresolvurljobtest.h
@@ -29,6 +29,7 @@ public:
private Q_SLOTS:
void shouldHaveDefaultValue();
+ void shouldChangeValue();
void shouldNotStart();
void shouldGenerateGravatarUrl_data();