Fixed build errors and adjusted a test case.

This commit is contained in:
yhirose 2017-06-28 19:36:48 -04:00
parent f3eb1c4e00
commit 7cdf62dd31
4 changed files with 21 additions and 4 deletions

View file

@ -267,7 +267,17 @@ TEST_F(ServerTest, GetMethodDir)
ASSERT_TRUE(res != nullptr);
EXPECT_EQ(200, res->status);
EXPECT_EQ("text/html", res->get_header_value("Content-Type"));
EXPECT_EQ("index.html", res->body);
auto body = R"(<html>
<head>
</head>
<body>
<a href="/dir/test.html">Test</a>
<a href="/hi">hi</a>
</body>
</html>
)";
EXPECT_EQ(body, res->body);
}
TEST_F(ServerTest, GetMethodDirTest)

View file

@ -1 +1,8 @@
index.html
<html>
<head>
</head>
<body>
<a href="/dir/test.html">Test</a>
<a href="/hi">hi</a>
</body>
</html>