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 {
1663
1663
EXPECT_EQ (" 0" , req.get_header_value (" Content-Length" ));
1664
1664
res.set_content (" empty-no-content-type" , " text/plain" );
1665
1665
})
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
+ })
1666
1671
.Put (" /empty-no-content-type" ,
1667
1672
[&](const Request &req, Response &res) {
1668
1673
EXPECT_EQ (req.body , " " );
@@ -2068,6 +2073,13 @@ TEST_F(ServerTest, PostEmptyContentWithNoContentType) {
2068
2073
ASSERT_EQ (" empty-no-content-type" , res->body );
2069
2074
}
2070
2075
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
+
2071
2083
TEST_F (ServerTest, PutEmptyContentWithNoContentType) {
2072
2084
auto res = cli_.Put (" /empty-no-content-type" );
2073
2085
ASSERT_TRUE (res);
You can’t perform that action at this time.
0 commit comments