summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorŁukasz Paczos <lukas.paczos@gmail.com>2019-05-14 14:54:24 +0200
committerŁukasz Paczos <lukasz.paczos@mapbox.com>2019-05-24 15:03:55 +0200
commit46ef2d86d2065aaaa63e8c83c750e46c74932777 (patch)
tree22e1e0321281830c11d08b22b901250dbc137860 /test
parent749044f1b084b7172bd0ac93b0a450599f246f56 (diff)
downloadqtlocation-mapboxgl-46ef2d86d2065aaaa63e8c83c750e46c74932777.tar.gz
[core] invoke optional resource path change completion listener
Diffstat (limited to 'test')
-rw-r--r--test/storage/default_file_source.test.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/storage/default_file_source.test.cpp b/test/storage/default_file_source.test.cpp
index e1c5df6895..64b23e315c 100644
--- a/test/storage/default_file_source.test.cpp
+++ b/test/storage/default_file_source.test.cpp
@@ -572,6 +572,18 @@ TEST(DefaultFileSource, TEST_REQUIRES_SERVER(SetResourceTransform)) {
loop.run();
}
+TEST(DefaultFileSource, SetResourceCachePath) {
+ util::RunLoop loop;
+ DefaultFileSource fs(":memory:", ".");
+
+ Actor<PathChangeCallback> callback(loop, [&]() -> void {
+ loop.stop();
+ });
+
+ fs.setResourceCachePath("./new_offline.db", callback.self());
+ loop.run();
+}
+
// Test that a stale cache file that has must-revalidate set will trigger a response.
TEST(DefaultFileSource, TEST_REQUIRES_SERVER(RespondToStaleMustRevalidate)) {
util::RunLoop loop;