aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs b/tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs
new file mode 100644
index 0000000000..81cff49945
--- /dev/null
+++ b/tests/Jellyfin.Server.Integration.Tests/HostedServiceRegistrationTests.cs
@@ -0,0 +1,26 @@
+using Jellyfin.Server.Implementations.Users;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Xunit;
+
+namespace Jellyfin.Server.Integration.Tests;
+
+public sealed class HostedServiceRegistrationTests : IClassFixture<JellyfinApplicationFactory>
+{
+ private readonly JellyfinApplicationFactory _factory;
+
+ public HostedServiceRegistrationTests(JellyfinApplicationFactory factory)
+ {
+ _factory = factory;
+ }
+
+ [Fact]
+ public void DeviceAccessHost_IsRegisteredAsHostedService()
+ {
+ _ = _factory.CreateClient();
+
+ var hostedServices = _factory.Services.GetServices<IHostedService>();
+
+ Assert.Contains(hostedServices, service => service is DeviceAccessHost);
+ }
+}