summaryrefslogtreecommitdiff
path: root/service/test.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2018-03-10 13:45:40 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2018-03-10 13:45:40 +0000
commit743f77d3161676c9c62ac648d8d85fac93da6259 (patch)
tree7f89ebafc57009ba98c0c7e21e5226c28d830a0a /service/test.cpp
parentConfigure install rules (diff)
downloadmirrorsearch-743f77d3161676c9c62ac648d8d85fac93da6259.tar.bz2
mirrorsearch-743f77d3161676c9c62ac648d8d85fac93da6259.tar.xz
mirrorsearch-743f77d3161676c9c62ac648d8d85fac93da6259.zip
Tighten error handling
Diffstat (limited to 'service/test.cpp')
-rw-r--r--service/test.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/service/test.cpp b/service/test.cpp
index 979d43d..5be34e7 100644
--- a/service/test.cpp
+++ b/service/test.cpp
@@ -50,7 +50,17 @@ BOOST_AUTO_TEST_CASE(getServices)
BOOST_AUTO_TEST_CASE(getMatches_failure)
{
- BOOST_REQUIRE_THROW(s->getMatches("no.fixture"), MirrorSearch::XmlError);
+ BOOST_REQUIRE_THROW(s->getMatches("no.fixture"), MirrorSearch::CurlError);
+}
+
+BOOST_AUTO_TEST_CASE(getMatches_empty_response)
+{
+ BOOST_REQUIRE_THROW(s->getMatches("empty"), MirrorSearch::CurlError);
+}
+
+BOOST_AUTO_TEST_CASE(getMatches_not_html)
+{
+ BOOST_REQUIRE_THROW(s->getMatches("not"), MirrorSearch::XmlError);
}
BOOST_AUTO_TEST_CASE(getMatches_zstd_notfound)