Skip to content

Commit 8e86e81

Browse files
committed
curl_contianer: add test
Signed-off-by: Sebastian Muxel <[email protected]>
1 parent a0e2c76 commit 8e86e81

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/structures_tests.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ TEST(ParametersTests, DisableEncodingTest) {
5050
EXPECT_EQ(parameters.GetContent(CurlHolder()), expected);
5151
}
5252

53+
TEST(ParametersTests, NoCurlHolderTest) {
54+
std::string key1 = "key1";
55+
std::string key2 = "key2§$%&/";
56+
std::string value1 = "hello.,.,";
57+
std::string value2 = "hello";
58+
Parameters parameters{{key1, value1}, {key2, value2}};
59+
const std::string expected = key1 + '=' + value1 + '&' + key2 + '=' + value2;
60+
EXPECT_EQ(parameters.GetContent(), expected);
61+
}
62+
5363
TEST(UrlToAndFromString, UrlTests) {
5464
std::string s{"https://github.com/whoshuu/cpr"};
5565
cpr::Url url = s;

0 commit comments

Comments
 (0)