aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2023-10-10 15:58:51 -0600
committerCody Robibero <cody@robibe.ro>2023-10-10 15:59:34 -0600
commit6bd6fb6e0a4828cc5cb16a4e48a8fba20a7d6305 (patch)
tree208e41ce44cb66107843dd2fdb80cbe673bc1240 /tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs
parentbc88c96cbe13301ee6e5f6a2d688a4c90338281d (diff)
parent74f61fbd79ef2e2ad4a986f5f886581b2827de07 (diff)
Merge branch 'master' into chromecast-config
# Conflicts: # Emby.Server.Implementations/ApplicationHost.cs
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/Controllers/PersonsControllerTests.cs26
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);
+ }
+}