summaryrefslogtreecommitdiff
path: root/tests/bindingstest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bindingstest.cpp')
-rw-r--r--tests/bindingstest.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/bindingstest.cpp b/tests/bindingstest.cpp
index 8dd2bd5..5b5718e 100644
--- a/tests/bindingstest.cpp
+++ b/tests/bindingstest.cpp
@@ -134,6 +134,29 @@ void BindingsTest::relationConfigurationCompletness()
QCOMPARE(re.relation(), relation);
}
+void BindingsTest::fileDriverConfigurationCompletness()
+{
+ Kolab::FileDriver fileDriver("driver", "title");
+ fileDriver.setEnabled(false);
+ fileDriver.setSettings("settings");
+
+ Kolab::Configuration configuration(fileDriver);
+ configuration.setUid("uid");
+ configuration.setCreated(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+ configuration.setLastModified(Kolab::cDateTime(2006,1,6,12,0,0,true)); //UTC
+
+ const std::string &result = Kolab::writeConfiguration(configuration);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+// std::cout << result << std::endl;
+ const Kolab::Configuration &re = Kolab::readConfiguration(result, false);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ QCOMPARE(re.uid(), configuration.uid());
+ QCOMPARE(re.created(), configuration.created());
+ QCOMPARE(re.lastModified(), configuration.lastModified());
+ QCOMPARE(re.type(), Kolab::Configuration::TypeFileDriver);
+ QCOMPARE(re.fileDriver(), fileDriver);
+}
+
void BindingsTest::noteCompletness()
{
Kolab::Note note;