Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ceef3e3

Browse files
committed
Check GitHub and GitHub Enterprise log-in options available
1 parent 74c80c2 commit ceef3e3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/GitHub.App.UnitTests/ViewModels/Dialog/LoginCredentialsViewModelTests.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ public async Task AllowsLoginFromEnterpriseAfterGitHubLoginHasFailedAsync()
7676
public class TheLoginModeProperty : TestBaseClass
7777
{
7878
[Test]
79-
public void LoginModeTracksAvailableConnections()
79+
public void LoginModeIgnoresAvailableConnections()
8080
{
81+
// We always want to option to log-in to GitHub or GitHub Enterprise
82+
8183
var connectionManager = Substitute.For<IConnectionManager>();
8284
var connections = new ObservableCollectionEx<IConnection>();
8385
var gitHubLogin = Substitute.For<ILoginToGitHubViewModel>();
@@ -96,13 +98,13 @@ public void LoginModeTracksAvailableConnections()
9698
Assert.That(LoginMode.DotComOrEnterprise, Is.EqualTo(loginViewModel.LoginMode));
9799

98100
connections.Add(enterpriseConnection);
99-
Assert.That(LoginMode.DotComOnly, Is.EqualTo(loginViewModel.LoginMode));
101+
Assert.That(LoginMode.DotComOrEnterprise, Is.EqualTo(loginViewModel.LoginMode));
100102

101103
connections.Add(gitHubConnection);
102-
Assert.That(LoginMode.None, Is.EqualTo(loginViewModel.LoginMode));
104+
Assert.That(LoginMode.DotComOrEnterprise, Is.EqualTo(loginViewModel.LoginMode));
103105

104106
connections.RemoveAt(0);
105-
Assert.That(LoginMode.EnterpriseOnly, Is.EqualTo(loginViewModel.LoginMode));
107+
Assert.That(LoginMode.DotComOrEnterprise, Is.EqualTo(loginViewModel.LoginMode));
106108
}
107109
}
108110

0 commit comments

Comments
 (0)