(t *testing.T)
| 916 | } |
| 917 | |
| 918 | func TestLoginPostMigrationSetsGitProtocol(t *testing.T) { |
| 919 | // Given we have logged in after migration |
| 920 | authCfg := newTestAuthConfig(t) |
| 921 | |
| 922 | var m migration.MultiAccountDeprecated |
| 923 | c := cfg{cfg: authCfg.cfg} |
| 924 | require.NoError(t, c.Migrate(m)) |
| 925 | |
| 926 | _, err := authCfg.Login("github.com", "test-user", "test-token", "ssh", false) |
| 927 | require.NoError(t, err) |
| 928 | |
| 929 | // When we get the host git protocol |
| 930 | hostProtocol, err := authCfg.cfg.Get([]string{hostsKey, "github.com", gitProtocolKey}) |
| 931 | require.NoError(t, err) |
| 932 | |
| 933 | // Then it returns the git protocol we provided on login |
| 934 | require.Equal(t, "ssh", hostProtocol) |
| 935 | } |
| 936 | |
| 937 | func TestLoginPostMigrationSetsUser(t *testing.T) { |
| 938 | // Given we have logged in after migration |
nothing calls this directly
no test coverage detected