summaryrefslogtreecommitdiff
path: root/test/storage
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-09-15 22:01:09 -0700
committerGitHub <noreply@github.com>2016-09-15 22:01:09 -0700
commit9ef65440b6bfd2c8da17d2613f8c967682cc0ef9 (patch)
tree52b5508cae9fe76548b9efee15268d2da1543080 /test/storage
parent217c43d1255f36c7ef2b588a90b6c19ca176dce2 (diff)
downloadqtlocation-mapboxgl-9ef65440b6bfd2c8da17d2613f8c967682cc0ef9.tar.gz
[core] [android] - public api configurable base endpoint (#6309)
add runloop to test
Diffstat (limited to 'test/storage')
-rw-r--r--test/storage/online_file_source.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/storage/online_file_source.cpp b/test/storage/online_file_source.cpp
index f67d96f257..b832f9c339 100644
--- a/test/storage/online_file_source.cpp
+++ b/test/storage/online_file_source.cpp
@@ -4,6 +4,7 @@
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/run_loop.hpp>
#include <mbgl/util/timer.hpp>
+#include <mbgl/util/constants.hpp>
#include <gtest/gtest.h>
@@ -403,3 +404,13 @@ TEST(OnlineFileSource, TEST_REQUIRES_SERVER(RateLimitDefault)) {
loop.run();
}
+
+TEST(OnlineFileSource, ChangeAPIBaseURL){
+ util::RunLoop loop;
+ OnlineFileSource fs;
+
+ EXPECT_EQ(mbgl::util::API_BASE_URL, fs.getAPIBaseURL());
+ const std::string customURL = "test.domain";
+ fs.setAPIBaseURL(customURL);
+ EXPECT_EQ(customURL, fs.getAPIBaseURL());
+} \ No newline at end of file