Skip to content
Prev Previous commit
Next Next commit
Added a unit test for the HTTP client response.
  • Loading branch information
glynos committed Apr 10, 2016
commit 5f6ab563f15417453fb2ba23c8d6f9c03efaa104
1 change: 1 addition & 0 deletions libs/network/test/http/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
set(
TESTS
request_test
response_test
)

foreach(test ${TESTS})
Expand Down
2 changes: 1 addition & 1 deletion libs/network/test/http/client/request_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ TEST(http_client_request, construct_from_uri) {
ASSERT_NO_THROW(client_request("http://cpp-netlib.org/"));
}

TEST(http_client_request, construct_from_invalid_uri) {
TEST(http_client_request, DISABLED_construct_from_invalid_uri) {
ASSERT_THROW(client_request("I am not a valid URI"), std::exception);
}
17 changes: 17 additions & 0 deletions libs/network/test/http/client/response_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright 2016 Glyn Matthews.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)


#include <gtest/gtest.h>
// #include <boost/network/protocol/http/client/response.hpp>
#include <boost/network/protocol/http/client.hpp>


using client_response = boost::network::http::client::response;


TEST(http_client_response, construct) {
ASSERT_NO_THROW(client_response());
}