summaryrefslogtreecommitdiff
path: root/site/test.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-03-08 21:19:51 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-03-08 22:41:03 +0000
commit24ef0c9a6e9537843eab4f0219752831b67ad00c (patch)
tree7447b5bb206689f128afe044a7d6a41ec65aeee9 /site/test.cpp
parentAllow configuring referrer and useragent, also set a collection of other hand... (diff)
downloadmirrorsearch-24ef0c9a6e9537843eab4f0219752831b67ad00c.tar.bz2
mirrorsearch-24ef0c9a6e9537843eab4f0219752831b67ad00c.tar.xz
mirrorsearch-24ef0c9a6e9537843eab4f0219752831b67ad00c.zip
Add endpoint for listing services
Diffstat (limited to 'site/test.cpp')
-rw-r--r--site/test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/site/test.cpp b/site/test.cpp
index 7fcc2ae..ab71f83 100644
--- a/site/test.cpp
+++ b/site/test.cpp
@@ -69,6 +69,15 @@ BOOST_AUTO_TEST_CASE( testCallIndexNoFile )
BOOST_CHECK_EQUAL(h["Status"], "404 Not found");
}
+BOOST_AUTO_TEST_CASE( testCallServiceList )
+{
+ TestRequest requestGetIndex(this, HttpMethod::GET, "/services");
+ process(&requestGetIndex);
+ auto h = requestGetIndex.getResponseHeaders();
+ BOOST_CHECK_EQUAL(h["Status"], "200 OK");
+ BOOST_CHECK_EQUAL(h["Content-Type"], "application/json");
+}
+
BOOST_AUTO_TEST_CASE( testCallIndex )
{
TestRequest requestGetIndex(this, HttpMethod::GET, "/list/somefile.txt");