[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kmymoney/4.8] kmymoney/mymoney: kmymoneytransactionfiltertest: add 'same date' and 'bad date order'
From:       Ralf Habacker <null () kde ! org>
Date:       2018-09-28 19:04:42
Message-ID: E1g5y4A-0004NX-9F () code ! kde ! org
[Download RAW message or body]

Git commit 55eb90e55389f7a93c77a7fcf39d0c5a171ad9b6 by Ralf Habacker.
Committed on 28/09/2018 at 19:04.
Pushed by habacker into branch '4.8'.

kmymoneytransactionfiltertest: add 'same date' and 'bad date order' test

CCBUG:395327

M  +9    -0    kmymoney/mymoney/mymoneytransactionfiltertest.cpp

https://commits.kde.org/kmymoney/55eb90e55389f7a93c77a7fcf39d0c5a171ad9b6

diff --git a/kmymoney/mymoney/mymoneytransactionfiltertest.cpp b/kmymoney/m=
ymoney/mymoneytransactionfiltertest.cpp
index 5aca814ad..65b8ce715 100644
--- a/kmymoney/mymoney/mymoneytransactionfiltertest.cpp
+++ b/kmymoney/mymoney/mymoneytransactionfiltertest.cpp
@@ -280,10 +280,19 @@ void MyMoneyTransactionFilterTest::testMatchTransacti=
onDate()
   QVERIFY(filter.match(transaction));
   QCOMPARE(filter.matchingSplits().size(), 2);
 =

+  // check same date
+  filter.setDateFilter(QDate(2014, 1, 2), QDate(2014, 1, 2));
+  QVERIFY(filter.match(transaction));
+  QCOMPARE(filter.matchingSplits().size(), 2);
+
   filter.setReportAllSplits(false);
   QVERIFY(filter.match(transaction));
   QCOMPARE(filter.matchingSplits().size(), 1);
 =

+  // check bad date order
+  filter.setDateFilter(QDate(2014, 1, 2), QDate(2014, 1, 1));
+  QVERIFY(!filter.match(transaction));
+
   filter.setDateFilter(QDate(2014, 1, 3), QDate(2014, 1, 5));
   QVERIFY(!filter.match(transaction));
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic