소스 검색

Added one more case to MountTest.Redicect unit test.

yhirose 1 년 전
부모
커밋
485f8f2411
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      test/test.cc

+ 5 - 0
test/test.cc

@@ -5098,6 +5098,11 @@ TEST(MountTest, Redicect) {
   res = cli.Get("/file/");
   ASSERT_TRUE(res);
   EXPECT_EQ(StatusCode::NotFound_404, res->status);
+
+  cli.set_follow_location(true);
+  res = cli.Get("/dir");
+  ASSERT_TRUE(res);
+  EXPECT_EQ(StatusCode::OK_200, res->status);
 }
 
 #ifndef CPPHTTPLIB_NO_EXCEPTIONS