diff options
| author | Stepan Goremykin <goremukin@gmail.com> | 2023-10-12 20:11:16 +0200 |
|---|---|---|
| committer | Stepan Goremykin <goremukin@gmail.com> | 2023-10-12 20:11:16 +0200 |
| commit | 8d7e4229ca694d8222cd7b97519b63a5c79f770b (patch) | |
| tree | 81def03b33fb5bb737467c2f92a289e17fb9a53d /tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs | |
| parent | 96c3bde3463ad0457d894ed532093ed28e868ba8 (diff) | |
| parent | 075b828cbf42804439fd847b5ae3701061906fda (diff) | |
Merge branch 'master' into fix-resharper-warnings
# Conflicts:
# Emby.Server.Implementations/Net/SocketFactory.cs
# RSSDP/SsdpCommunicationsServer.cs
# RSSDP/SsdpDeviceLocator.cs
# RSSDP/SsdpDevicePublisher.cs
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs')
| -rw-r--r-- | tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs b/tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs new file mode 100644 index 000000000..38c64547c --- /dev/null +++ b/tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs @@ -0,0 +1,26 @@ +using System.Net; +using System.Threading.Tasks; +using Xunit; + +namespace Jellyfin.Server.Integration.Tests.Controllers; + +public class PersonsControllerTests : IClassFixture<JellyfinApplicationFactory> +{ + private readonly JellyfinApplicationFactory _factory; + private static string? _accessToken; + + public PersonsControllerTests(JellyfinApplicationFactory factory) + { + _factory = factory; + } + + [Fact] + public async Task GetPerson_DoesntExist_NotFound() + { + var client = _factory.CreateClient(); + client.DefaultRequestHeaders.AddAuthHeader(_accessToken ??= await AuthHelper.CompleteStartupAsync(client)); + + using var response = await client.GetAsync($"Persons/DoesntExist"); + Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); + } +} |
