From 3d4a6dde3da8d564bcbca21842302cbf8fde89c4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 21 May 2017 15:28:33 +0100 Subject: Update with recent test from mock api --- libtmdb/testFormatUrls.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libtmdb/testFormatUrls.cpp') diff --git a/libtmdb/testFormatUrls.cpp b/libtmdb/testFormatUrls.cpp index 0df6670..49ce017 100644 --- a/libtmdb/testFormatUrls.cpp +++ b/libtmdb/testFormatUrls.cpp @@ -18,41 +18,41 @@ BOOST_AUTO_TEST_CASE( format_url_simple ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something/%d", 23, { }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something/23?apikey=48b32823d2b60c5c1085af36daed03fa", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something/23?api_key=48b32823d2b60c5c1085af36daed03fa", url); } BOOST_AUTO_TEST_CASE( format_url_query ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something/%d", 23, { { "page", 5 } }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something/23?apikey=48b32823d2b60c5c1085af36daed03fa&page=5", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something/23?api_key=48b32823d2b60c5c1085af36daed03fa&page=5", url); } BOOST_AUTO_TEST_CASE( format_url_multiple ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something", { { "page", 5}, {"query", "string" } }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?apikey=48b32823d2b60c5c1085af36daed03fa&page=5&query=string", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?api_key=48b32823d2b60c5c1085af36daed03fa&page=5&query=string", url); } BOOST_AUTO_TEST_CASE( format_url_escaped ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something", { { "query", "sample string" } }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?apikey=48b32823d2b60c5c1085af36daed03fa&query=sample%20string", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?api_key=48b32823d2b60c5c1085af36daed03fa&query=sample%20string", url); } BOOST_AUTO_TEST_CASE( format_url_optionalvalue ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something", { { "query", IceUtil::Optional(10) } }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?apikey=48b32823d2b60c5c1085af36daed03fa&query=10", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?api_key=48b32823d2b60c5c1085af36daed03fa&query=10", url); } BOOST_AUTO_TEST_CASE( format_url_optionalnovalue ) { TMDb::Proxy test(MockBase, ApiKey); auto url = test.GetUrl("/something", { { "query", IceUtil::Optional() } }); - BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?apikey=48b32823d2b60c5c1085af36daed03fa", url); + BOOST_REQUIRE_EQUAL("http://private-5513-themoviedb.apiary-mock.com/3/something?api_key=48b32823d2b60c5c1085af36daed03fa", url); } -- cgit v1.2.3