From cd6ee68fec1562e4bac0147fd4bc0776084a27cc Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 12 Oct 2022 11:19:00 +0200 Subject: [PATCH] filter out some errors if they are related to network troubles Signed-off-by: Matthieu Gallien --- test/testactivitylistmodel.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/testactivitylistmodel.cpp b/test/testactivitylistmodel.cpp index c050a091d..a98db6b61 100644 --- a/test/testactivitylistmodel.cpp +++ b/test/testactivitylistmodel.cpp @@ -445,6 +445,17 @@ public: return model; } + void testActivityAdd(void(OCC::ActivityListModel::*addingMethod)(const OCC::Activity&, OCC::ActivityListModel::ErrorType), OCC::Activity &activity) { + const auto model = testingALM(); + QCOMPARE(model->rowCount(), 0); + + (model.data()->*addingMethod)(activity, OCC::ActivityListModel::ErrorType::SyncError); + QCOMPARE(model->rowCount(), 1); + + const auto index = model->index(0, 0); + QVERIFY(index.isValid()); + } + void testActivityAdd(void(OCC::ActivityListModel::*addingMethod)(const OCC::Activity&), OCC::Activity &activity) { const auto model = testingALM(); QCOMPARE(model->rowCount(), 0);