filter out some errors if they are related to network troubles

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2022-10-12 11:19:00 +02:00 committed by Matthieu Gallien
parent 0e002f35f4
commit cd6ee68fec

View file

@ -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);