diff options
| author | Cody Robibero <cody@robibe.ro> | 2022-04-21 17:48:29 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2022-04-28 09:26:45 -0400 |
| commit | e5e7c10b818ca0de376fda11c3d83d0893307837 (patch) | |
| tree | ae974bc4d9b4deb1a39c7ffd655d1307c93f3ce3 | |
| parent | 8568913df0d515ed37d531703b21584e5a6e719b (diff) | |
Merge pull request #7638 from 1337joe/fix-quick-connect-tests
(cherry picked from commit 7c91543694ffd857d2b42e4c2ec4dca2832d9f82)
Signed-off-by: crobibero <cody@robibe.ro>
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/QuickConnect/QuickConnectManagerTests.cs | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/tests/Jellyfin.Server.Implementations.Tests/QuickConnect/QuickConnectManagerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/QuickConnect/QuickConnectManagerTests.cs index 28d832ef8..c32d89ea5 100644 --- a/tests/Jellyfin.Server.Implementations.Tests/QuickConnect/QuickConnectManagerTests.cs +++ b/tests/Jellyfin.Server.Implementations.Tests/QuickConnect/QuickConnectManagerTests.cs @@ -50,7 +50,10 @@ namespace Jellyfin.Server.Implementations.Tests.QuickConnect [Fact] public void IsEnabled_QuickConnectUnavailable_False() - => Assert.False(_quickConnectManager.IsEnabled); + { + _config.QuickConnectAvailable = false; + Assert.False(_quickConnectManager.IsEnabled); + } [Theory] [InlineData("", "DeviceId", "Client", "1.0.0")] @@ -69,19 +72,31 @@ namespace Jellyfin.Server.Implementations.Tests.QuickConnect [Fact] public void TryConnect_QuickConnectUnavailable_ThrowsAuthenticationException() - => Assert.Throws<AuthenticationException>(() => _quickConnectManager.TryConnect(_quickConnectAuthInfo)); + { + _config.QuickConnectAvailable = false; + Assert.Throws<AuthenticationException>(() => _quickConnectManager.TryConnect(_quickConnectAuthInfo)); + } [Fact] public void CheckRequestStatus_QuickConnectUnavailable_ThrowsAuthenticationException() - => Assert.Throws<AuthenticationException>(() => _quickConnectManager.CheckRequestStatus(string.Empty)); + { + _config.QuickConnectAvailable = false; + Assert.Throws<AuthenticationException>(() => _quickConnectManager.CheckRequestStatus(string.Empty)); + } [Fact] public void AuthorizeRequest_QuickConnectUnavailable_ThrowsAuthenticationException() - => Assert.ThrowsAsync<AuthenticationException>(() => _quickConnectManager.AuthorizeRequest(Guid.Empty, string.Empty)); + { + _config.QuickConnectAvailable = false; + Assert.ThrowsAsync<AuthenticationException>(() => _quickConnectManager.AuthorizeRequest(Guid.Empty, string.Empty)); + } [Fact] public void GetAuthorizedRequest_QuickConnectUnavailable_ThrowsAuthenticationException() - => Assert.Throws<AuthenticationException>(() => _quickConnectManager.GetAuthorizedRequest(string.Empty)); + { + _config.QuickConnectAvailable = false; + Assert.Throws<AuthenticationException>(() => _quickConnectManager.GetAuthorizedRequest(string.Empty)); + } [Fact] public void IsEnabled_QuickConnectAvailable_True() |
