From ad676623168e7b7b083f66617087c6cf424000d1 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Sun, 15 Jan 2017 02:01:22 +0300 Subject: Fix tests --- test/tgbot/net/HttpParser.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/tgbot/net') diff --git a/test/tgbot/net/HttpParser.cpp b/test/tgbot/net/HttpParser.cpp index 236eb90..9272736 100644 --- a/test/tgbot/net/HttpParser.cpp +++ b/test/tgbot/net/HttpParser.cpp @@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(generateRequest) { "Content-Type: application/x-www-form-urlencoded\r\n" "Content-Length: 49\r\n" "\r\n" - "email=test%40example.com&text=Hello%2c%20world%21"; + "email=test%40example.com&text=Hello%2C%20world%21"; BOOST_CHECK_MESSAGE(t == e, diffS(t, e)); } @@ -55,17 +55,18 @@ BOOST_AUTO_TEST_CASE(generateMultipartFormData) { "\r\n" "test@example.com\r\n" "--" + boundary + "\r\n" - "Content-Disposition: form-data; name=\"text\"\r\n" + "Content-Disposition: form-data; name=\"text\"; filename=\"\"\r\n" "Content-Type: text/plain\r\n" "\r\n" - "Hello, world!\r\n"; + "Hello, world!\r\n" + "--" + boundary + "--\r\n"; BOOST_CHECK_MESSAGE(t == e, diffS(t, e)); } BOOST_AUTO_TEST_CASE(generateWwwFormUrlencoded) { vector args = { HttpReqArg("email", "test@example.com"), HttpReqArg("text", "Hello, world!") }; string t = HttpParser::getInstance().generateWwwFormUrlencoded(args); - string e = "email=test%40example.com&text=Hello%2c%20world%21"; + string e = "email=test%40example.com&text=Hello%2C%20world%21"; BOOST_CHECK_MESSAGE(t == e, diffS(t, e)); } -- cgit v1.2.3