File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1663,6 +1663,11 @@ class ServerTest : public ::testing::Test {
16631663 EXPECT_EQ (" 0" , req.get_header_value (" Content-Length" ));
16641664 res.set_content (" empty-no-content-type" , " text/plain" );
16651665 })
1666+ .Post (" /post-large" ,
1667+ [&](const Request &req, Response &res) {
1668+ EXPECT_EQ (req.body , LARGE_DATA);
1669+ res.set_content (req.body , " text/plain" );
1670+ })
16661671 .Put (" /empty-no-content-type" ,
16671672 [&](const Request &req, Response &res) {
16681673 EXPECT_EQ (req.body , " " );
@@ -2068,6 +2073,13 @@ TEST_F(ServerTest, PostEmptyContentWithNoContentType) {
20682073 ASSERT_EQ (" empty-no-content-type" , res->body );
20692074}
20702075
2076+ TEST_F (ServerTest, PostLarge) {
2077+ auto res = cli_.Post (" /post-large" , LARGE_DATA, " text/plain" );
2078+ ASSERT_TRUE (res);
2079+ ASSERT_EQ (200 , res->status );
2080+ EXPECT_EQ (LARGE_DATA, res->body );
2081+ }
2082+
20712083TEST_F (ServerTest, PutEmptyContentWithNoContentType) {
20722084 auto res = cli_.Put (" /empty-no-content-type" );
20732085 ASSERT_TRUE (res);
You can’t perform that action at this time.
0 commit comments