diff options
| author | cvium <clausvium@gmail.com> | 2023-02-12 22:59:48 +0100 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2023-02-12 22:59:48 +0100 |
| commit | 52e2776d8e9390db35fc1d0c3899ed3dccad5282 (patch) | |
| tree | d59cf8572ba62ad03169833045f64b30960482c5 /tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs | |
| parent | c9aef96dba26d29df3db9e3a1ce243be23bea772 (diff) | |
| parent | 318f11e79331e4786c44734ce496eb6485201c2b (diff) | |
Merge branch 'master' into simplify_authz
# Conflicts:
# Jellyfin.Api/Auth/SyncPlayAccessPolicy/SyncPlayAccessHandler.cs
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs new file mode 100644 index 000000000..0f9a2e90a --- /dev/null +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/VideosControllerTests.cs @@ -0,0 +1,27 @@ +using System; +using System.Net; +using System.Threading.Tasks; +using Xunit; + +namespace Jellyfin.Server.Integration.Tests.Controllers; + +public sealed class VideosControllerTests : IClassFixture<JellyfinApplicationFactory> +{ + private readonly JellyfinApplicationFactory _factory; + private static string? _accessToken; + + public VideosControllerTests(JellyfinApplicationFactory factory) + { + _factory = factory; + } + + [Fact] + public async Task DeleteAlternateSources_NonExistentItemId_NotFound() + { + var client = _factory.CreateClient(); + client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client).ConfigureAwait(false)); + + var response = await client.DeleteAsync($"Videos/{Guid.NewGuid()}").ConfigureAwait(false); + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + } +} |
