mirror of
https://github.com/monero-project/kovri
synced 2025-10-06 00:32:51 +02:00
Tests: add case for setting invalid HTTPResponse code
Referencing #938.
This commit is contained in:
@@ -251,4 +251,12 @@ BOOST_AUTO_TEST_CASE(ValidResponse)
|
||||
// TODO(oneiric): after Boost.Beast refactor, check response follows HTTP protocol
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(InvalidResponse)
|
||||
{
|
||||
client::HTTPResponse response(client::HTTPResponse::ok);
|
||||
BOOST_CHECK_THROW(
|
||||
response.set(static_cast<client::HTTPResponse::status_t>(12345)),
|
||||
std::exception);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
Reference in New Issue
Block a user