소스 검색

MediaInfoControllerTests: Check Content-Length

Bond_009 4 년 전
부모
커밋
8b1a211081
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      tests/Jellyfin.Server.Integration.Tests/Controllers/MediaInfoControllerTests.cs

+ 3 - 0
tests/Jellyfin.Server.Integration.Tests/Controllers/MediaInfoControllerTests.cs

@@ -26,6 +26,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
 
             Assert.Equal(HttpStatusCode.OK, response.StatusCode);
             Assert.Equal(MediaTypeNames.Application.Octet, response.Content.Headers.ContentType?.MediaType);
+            Assert.NotNull(response.Content.Headers.ContentLength);
         }
 
         [Theory]
@@ -39,6 +40,8 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
 
             Assert.Equal(HttpStatusCode.OK, response.StatusCode);
             Assert.Equal(MediaTypeNames.Application.Octet, response.Content.Headers.ContentType?.MediaType);
+            Assert.NotNull(response.Content.Headers.ContentLength);
+            Assert.InRange(response.Content.Headers.ContentLength!.Value, size, long.MaxValue);
         }
 
         [Theory]