summaryrefslogtreecommitdiff
path: root/tests/validationtest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validationtest.cpp')
-rw-r--r--tests/validationtest.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/validationtest.cpp b/tests/validationtest.cpp
index 97a928e..a1a1c04 100644
--- a/tests/validationtest.cpp
+++ b/tests/validationtest.cpp
@@ -39,6 +39,29 @@ void ValidationTest::testNoErrorOnValidEvent()
QCOMPARE(Kolab::error(), Kolab::NoError);
}
+void ValidationTest::testNoErrorOnValidTodo()
+{
+ {
+ Todo todo;
+ todo.setStart(cDateTime("Europe/Zurich", 2013,1,1,1,1,1));
+ writeTodo(todo);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ }
+ {
+ Todo todo;
+ todo.setDue(cDateTime("Europe/Zurich", 2013,1,1,1,1,1));
+ writeTodo(todo);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ }
+ {
+ Todo todo;
+ todo.setStart(cDateTime("Europe/Zurich", 2013,1,1,1,1,1));
+ todo.setDue(cDateTime("Europe/Zurich", 2013,1,1,1,1,1));
+ writeTodo(todo);
+ QCOMPARE(Kolab::error(), Kolab::NoError);
+ }
+}
+
void ValidationTest::testOlsonTimezone()
{
Event event;
@@ -54,6 +77,12 @@ void ValidationTest::testDifferentTimezones()
event.setEnd(cDateTime("Europe/London",2013,1,1,1,1,1));
writeEvent(event);
QCOMPARE(Kolab::error(), Kolab::Error);
+
+ Todo todo;
+ todo.setStart(cDateTime("Europe/Zurich",2013,1,1,1,1,1));
+ todo.setDue(cDateTime("Europe/London",2013,1,1,1,1,1));
+ writeTodo(todo);
+ QCOMPARE(Kolab::error(), Kolab::Error);
}
void ValidationTest::testUTCwithTimezone()