summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/storage/offline_download.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/storage/offline_download.cpp b/test/storage/offline_download.cpp
index da0b1ac0ee..1b35d561be 100644
--- a/test/storage/offline_download.cpp
+++ b/test/storage/offline_download.cpp
@@ -371,10 +371,22 @@ TEST(OfflineDownload, TileCountLimitExceeded) {
};
auto observer = std::make_unique<MockObserver>();
+ bool mapboxTileCountLimitExceededCalled = false;
observer->mapboxTileCountLimitExceededFn = [&] (uint64_t limit) {
+ EXPECT_FALSE(mapboxTileCountLimitExceededCalled);
EXPECT_EQ(0, limit);
- test.loop.stop();
+ mapboxTileCountLimitExceededCalled = true;
+ };
+
+ observer->statusChangedFn = [&] (OfflineRegionStatus status) {
+ EXPECT_FALSE(status.complete());
+ if (!mapboxTileCountLimitExceededCalled) {
+ EXPECT_EQ(OfflineRegionDownloadState::Active, status.downloadState);
+ } else {
+ EXPECT_EQ(OfflineRegionDownloadState::Inactive, status.downloadState);
+ test.loop.stop();
+ }
};
download.setObserver(std::move(observer));