aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2021-12-01 15:58:23 +0100
committerBond_009 <bond.009@outlook.com>2021-12-01 15:58:23 +0100
commit40be86eec0fa7f43b64d05f30adcfab88ad3c402 (patch)
tree35fef4b8f6db6c0df9a91ed5059150bfabb85d3d /tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
parentbeafd6eaabf7baa7c478b4a0ef131ddc480b368a (diff)
Use PostAsJsonAsync where possible
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
index a9713b4cb..2da5237db 100644
--- a/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/MediaStructureControllerTests.cs
@@ -72,8 +72,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
Path = "/this/path/doesnt/exist"
};
- using var postContent = JsonContent.Create(data, options: _jsonOptions);
- var response = await client.PostAsync("Library/VirtualFolders/Paths", postContent).ConfigureAwait(false);
+ var response = await client.PostAsJsonAsync("Library/VirtualFolders/Paths", data, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
}
@@ -90,8 +89,7 @@ namespace Jellyfin.Server.Integration.Tests.Controllers
PathInfo = new MediaPathInfo("test")
};
- using var postContent = JsonContent.Create(data, options: _jsonOptions);
- var response = await client.PostAsync("Library/VirtualFolders/Paths/Update", postContent).ConfigureAwait(false);
+ var response = await client.PostAsJsonAsync("Library/VirtualFolders/Paths/Update", data, _jsonOptions).ConfigureAwait(false);
Assert.Equal(HttpStatusCode.BadRequest, response.StatusCode);
}