diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-06 16:48:05 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2015-03-06 18:16:58 -0800 |
commit | a5998dc59b0b2ba37b4ff8543d5decb7e37c9cfa (patch) | |
tree | af537b91f286e34c2dd4e971d78e570de7b4b394 /test | |
parent | 682cc283401b1784648c7eb5750ad78fcbdf42e2 (diff) | |
download | qtlocation-mapboxgl-a5998dc59b0b2ba37b4ff8543d5decb7e37c9cfa.tar.gz |
Fix conditional in normalizeSourceURL
The existing conditional would always be false, since it
was comparing a url that begins with "mapbox://". In fact
no conditional is necessary; the secure TileJSON resource
should always be requested.
Diffstat (limited to 'test')
-rw-r--r-- | test/miscellaneous/mapbox.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/miscellaneous/mapbox.cpp b/test/miscellaneous/mapbox.cpp index 9496f2d270..a9c709fe97 100644 --- a/test/miscellaneous/mapbox.cpp +++ b/test/miscellaneous/mapbox.cpp @@ -7,8 +7,8 @@ using namespace mbgl; TEST(Mapbox, SourceURL) { - EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "key"), "https://api.tiles.mapbox.com/v4/user.map.json?access_token=key"); - EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "token"), "https://api.tiles.mapbox.com/v4/user.map.json?access_token=token"); + EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "key"), "https://api.tiles.mapbox.com/v4/user.map.json?access_token=key&secure"); + EXPECT_EQ(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", "token"), "https://api.tiles.mapbox.com/v4/user.map.json?access_token=token&secure"); EXPECT_THROW(mbgl::util::mapbox::normalizeSourceURL("mapbox://user.map", ""), std::runtime_error); } |