Commit f69321af authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add more unittest

parent a83bcc06
......@@ -16,7 +16,7 @@
*/
#include "sendlaterinfotest.h"
#include "../sendlaterinfo.h"
#include <qtest_kde.h>
SendLaterInfoTest::SendLaterInfoTest()
......@@ -25,7 +25,16 @@ SendLaterInfoTest::SendLaterInfoTest()
void SendLaterInfoTest::shouldHaveDefaultValue()
{
SendLater::SendLaterInfo info;
QCOMPARE(info.itemId(), Akonadi::Item::Id(-1));
QCOMPARE(info.isRecurrence(), false);
QVERIFY(!info.dateTime().isValid());
QVERIFY(!info.lastDateTimeSend().isValid());
QCOMPARE(info.to(), QString());
QCOMPARE(info.subject(), QString());
QVERIFY(!info.isValid());
QCOMPARE(info.recurrenceUnit(), SendLater::SendLaterInfo::Days);
QCOMPARE(info.recurrenceEachValue(), 1);
}
QTEST_KDEMAIN(SendLaterInfoTest, NoGUI)
......@@ -22,6 +22,7 @@
class SendLaterInfoTest : public QObject
{
Q_OBJECT
public:
SendLaterInfoTest();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment