summaryrefslogtreecommitdiff
path: root/test/http/router_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/http/router_test.cpp')
-rw-r--r--test/http/router_test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/http/router_test.cpp b/test/http/router_test.cpp
index f23331782b..23725416af 100644
--- a/test/http/router_test.cpp
+++ b/test/http/router_test.cpp
@@ -87,7 +87,8 @@ TEST(Router, OverlapingRoutes)
{
constexpr std::string_view url = "/foo/bar";
- Request req{{boost::beast::http::verb::get, url, 11}, ec};
+ auto req = std::make_shared<Request>(
+ Request::Body{boost::beast::http::verb::get, url, 11}, ec);
std::shared_ptr<bmcweb::AsyncResp> asyncResp =
std::make_shared<bmcweb::AsyncResp>();
@@ -112,7 +113,8 @@ TEST(Router, 404)
constexpr std::string_view url = "/foo/bar";
- Request req{{boost::beast::http::verb::get, url, 11}, ec};
+ auto req = std::make_shared<Request>(
+ Request::Body{boost::beast::http::verb::get, url, 11}, ec);
router.newRuleTagged<getParameterTag(url)>("/foo/<path>")
.notFound()(nullCallback);
@@ -142,7 +144,8 @@ TEST(Router, 405)
constexpr std::string_view url = "/foo/bar";
- Request req{{boost::beast::http::verb::patch, url, 11}, ec};
+ auto req = std::make_shared<Request>(
+ Request::Body{boost::beast::http::verb::patch, url, 11}, ec);
router.newRuleTagged<getParameterTag(url)>(std::string(url))
.methods(boost::beast::http::verb::get)(nullCallback);