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