0
0
mirror of https://github.com/monero-project/kovri synced 2025-10-06 00:32:51 +02:00

Tests: add check for valid HTTPMessage response

Referencing #938.
This commit is contained in:
anonimal
2018-07-03 01:25:10 +00:00
parent 4d7218d944
commit 6505496a9c

View File

@@ -239,12 +239,15 @@ BOOST_AUTO_TEST_CASE(ValidResponse)
BOOST_CHECK(response.get().size());
// TODO(unassigned): these are hacky ways to determine status code
BOOST_CHECK_NE(
response.get().find(std::to_string(status)), std::string::npos);
BOOST_CHECK_NE(
response.get().find(response.get_message(status)), std::string::npos);
// Set new response
BOOST_CHECK_NO_THROW(response.set(client::HTTPResponse::service_unavailable));
// TODO(oneiric): after Boost.Beast refactor, check response follows HTTP protocol
}