(t *testing.T)
| 867 | } |
| 868 | |
| 869 | func TestLoginPostMigrationSetsGitProtocol(t *testing.T) { |
| 870 | // Given we have logged in after migration |
| 871 | authCfg := newTestAuthConfig(t) |
| 872 | |
| 873 | var m migration.MultiAccount |
| 874 | c := cfg{authCfg.cfg} |
| 875 | require.NoError(t, c.Migrate(m)) |
| 876 | |
| 877 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 878 | require.NoError(t, err) |
| 879 | |
| 880 | // When we get the host git protocol |
| 881 | hostProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 882 | require.NoError(t, err) |
| 883 | |
| 884 | // Then it returns the git protocol we provided on login |
| 885 | require.Equal(t, "ssh", hostProtocol) |
| 886 | } |
| 887 | |
| 888 | func TestLoginPostMigrationSetsUser(t *testing.T) { |
| 889 | // Given we have logged in after migration |
nothing calls this directly
no test coverage detected