diff options
| author | Bond_009 <bond.009@outlook.com> | 2021-03-02 02:57:36 +0100 |
|---|---|---|
| committer | Bond_009 <bond.009@outlook.com> | 2021-03-09 14:24:19 +0100 |
| commit | b9577d0fd986fcadd656a9438eba81f49f375ad8 (patch) | |
| tree | 5ab304e073fca471403e9551bf0162bccaa4686c /tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs | |
| parent | 3471ddfc84b409a876ebdc71582195de8ad6934f (diff) | |
Check for specific status code instead of success
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs index 88905fc6d..86d6326d8 100644 --- a/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/DashboardControllerTests.cs @@ -37,7 +37,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers var response = await client.GetAsync("/web/ConfigurationPage?name=TestPlugin").ConfigureAwait(false); - Assert.True(response.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(MediaTypeNames.Text.Html, response.Content.Headers.ContentType?.MediaType); StreamReader reader = new StreamReader(typeof(TestPlugin).Assembly.GetManifestResourceStream("Jellyfin.Server.Integration.Tests.TestPage.html")!); Assert.Equal(await response.Content.ReadAsStringAsync(), reader.ReadToEnd()); @@ -60,7 +60,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers var response = await client.GetAsync("/web/ConfigurationPages").ConfigureAwait(false); - Assert.True(response.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); var res = await response.Content.ReadAsStreamAsync(); _ = await JsonSerializer.DeserializeAsync<ConfigurationPageInfo[]>(res, _jsonOpions); @@ -74,7 +74,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers var response = await client.GetAsync("/web/ConfigurationPages?enableInMainMenu=true").ConfigureAwait(false); - Assert.True(response.IsSuccessStatusCode); + Assert.Equal(HttpStatusCode.OK, response.StatusCode); Assert.Equal(MediaTypeNames.Application.Json, response.Content.Headers.ContentType?.MediaType); Assert.Equal(Encoding.UTF8.BodyName, response.Content.Headers.ContentType?.CharSet); |
