diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-03 17:35:06 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-10 15:40:20 -0800 |
commit | 7eb1a91c4e5134ecfbfb91b61a6622be40478af5 (patch) | |
tree | f017137f503ad7ce528b1bcb12f5df35bb319413 /test | |
parent | cdedb66387065680efd318dacb61572c920b81b1 (diff) | |
download | qtlocation-mapboxgl-7eb1a91c4e5134ecfbfb91b61a6622be40478af5.tar.gz |
[all] Do not set Response data for 404s
For AssetFileSource and the node FileSource this was already the case; this makes the other implementations consistent.
Diffstat (limited to 'test')
-rw-r--r-- | test/storage/http_error.cpp | 3 | ||||
-rw-r--r-- | test/storage/http_reading.cpp | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/test/storage/http_error.cpp b/test/storage/http_error.cpp index 3f29e5c745..259ea825eb 100644 --- a/test/storage/http_error.cpp +++ b/test/storage/http_error.cpp @@ -26,8 +26,7 @@ TEST_F(Storage, HTTPTemporaryError) { ASSERT_NE(nullptr, res.error); EXPECT_EQ(Response::Error::Reason::Server, res.error->reason); EXPECT_EQ("HTTP status code 500", res.error->message); - ASSERT_TRUE(res.data.get()); - EXPECT_EQ("", *res.data); + ASSERT_FALSE(bool(res.data)); EXPECT_FALSE(bool(res.expires)); EXPECT_FALSE(bool(res.modified)); EXPECT_FALSE(bool(res.etag)); diff --git a/test/storage/http_reading.cpp b/test/storage/http_reading.cpp index 36fbf43a14..d360ec0031 100644 --- a/test/storage/http_reading.cpp +++ b/test/storage/http_reading.cpp @@ -47,9 +47,8 @@ TEST_F(Storage, HTTP404) { EXPECT_TRUE(util::ThreadContext::currentlyOn(util::ThreadType::Main)); ASSERT_NE(nullptr, res.error); EXPECT_EQ(Response::Error::Reason::NotFound, res.error->reason); - ASSERT_TRUE(res.data.get()); - EXPECT_EQ("Cannot GET /doesnotexist\n", *res.data); EXPECT_EQ("HTTP status code 404", res.error->message); + EXPECT_FALSE(bool(res.data)); EXPECT_FALSE(bool(res.expires)); EXPECT_FALSE(bool(res.modified)); EXPECT_FALSE(bool(res.etag)); @@ -74,9 +73,8 @@ TEST_F(Storage, HTTP500) { EXPECT_TRUE(util::ThreadContext::currentlyOn(util::ThreadType::Main)); ASSERT_NE(nullptr, res.error); EXPECT_EQ(Response::Error::Reason::Server, res.error->reason); - ASSERT_TRUE(res.data.get()); - EXPECT_EQ("Server Error!", *res.data); EXPECT_EQ("HTTP status code 500", res.error->message); + EXPECT_FALSE(bool(res.data)); EXPECT_FALSE(bool(res.expires)); EXPECT_FALSE(bool(res.modified)); EXPECT_FALSE(bool(res.etag)); |