diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-21 15:28:33 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2017-05-21 15:28:33 +0100 |
commit | 3d4a6dde3da8d564bcbca21842302cbf8fde89c4 (patch) | |
tree | 01c91be0d5982f4626dcfc75ad12782f0bb37bfe /libtmdb/testCallMockApi.cpp | |
parent | Standalone split (diff) | |
download | p2pvr-3d4a6dde3da8d564bcbca21842302cbf8fde89c4.tar.bz2 p2pvr-3d4a6dde3da8d564bcbca21842302cbf8fde89c4.tar.xz p2pvr-3d4a6dde3da8d564bcbca21842302cbf8fde89c4.zip |
Update with recent test from mock api
Diffstat (limited to 'libtmdb/testCallMockApi.cpp')
-rw-r--r-- | libtmdb/testCallMockApi.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libtmdb/testCallMockApi.cpp b/libtmdb/testCallMockApi.cpp index 79efbe2..cb06791 100644 --- a/libtmdb/testCallMockApi.cpp +++ b/libtmdb/testCallMockApi.cpp @@ -3,24 +3,24 @@ #include "tmdb-proxy.h" -const std::string MockBase = "http://private-5513-themoviedb.apiary-mock.com/3"; +const std::string MockBase = "http://api.themoviedb.org/3"; const std::string ApiKey = "48b32823d2b60c5c1085af36daed03fa"; BOOST_AUTO_TEST_CASE( search_tmdb ) { TMDb::Proxy test(MockBase, ApiKey); - auto resp = test.SearchMulti("breaking bad", 0, Ice::Current()); - BOOST_REQUIRE_EQUAL(20, resp->Results.size()); - BOOST_REQUIRE_EQUAL(134, resp->TotalResults); + auto resp = test.SearchMulti("breaking bad", 1, Ice::Current()); + BOOST_REQUIRE_EQUAL(3, resp->Results.size()); + BOOST_REQUIRE_EQUAL(3, resp->TotalResults); BOOST_REQUIRE_EQUAL(1396, resp->Results[0]->Id); - BOOST_REQUIRE_EQUAL(34541, resp->Results[1]->Id); - BOOST_REQUIRE_EQUAL(332501, resp->Results[19]->Id); + BOOST_REQUIRE_EQUAL(239459, resp->Results[1]->Id); + BOOST_REQUIRE_EQUAL(19050, resp->Results[2]->Id); } BOOST_AUTO_TEST_CASE( get_movie ) { TMDb::Proxy test(MockBase, ApiKey); - auto resp = test.GetMovie(1396, Ice::Current()); + auto resp = test.GetMovie(550, Ice::Current()); BOOST_REQUIRE_EQUAL("Fight Club", resp->Title); } |