Skip to content

Commit

Permalink
filter out some errors if they are related to network troubles
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <[email protected]>
  • Loading branch information
mgallien committed Jun 26, 2023
1 parent d26eb5b commit c43bac0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/testactivitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,17 @@ class TestActivityListModel : public QObject
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);
Expand Down

0 comments on commit c43bac0

Please sign in to comment.