Fix the zero value of ICECredentialType

Ensure that the zero value of ICECredentialType is password.
This commit is contained in:
Juliusz Chroboczek
2022-05-11 02:17:02 +02:00
committed by Sean DuBois
parent 37a145a51f
commit b4579949e1
5 changed files with 36 additions and 25 deletions

View File

@@ -17,9 +17,10 @@ func TestNewICECredentialType(t *testing.T) {
}
for i, testCase := range testCases {
tpe, err := newICECredentialType(testCase.credentialTypeString)
assert.NoError(t, err)
assert.Equal(t,
testCase.expectedCredentialType,
newICECredentialType(testCase.credentialTypeString),
testCase.expectedCredentialType, tpe,
"testCase: %d %v", i, testCase,
)
}
@@ -53,9 +54,10 @@ func TestICECredentialType_new(t *testing.T) {
}
for i, testCase := range testCases {
tpe, err := newICECredentialType(testCase.expectedString)
assert.NoError(t, err)
assert.Equal(t,
newICECredentialType(testCase.expectedString),
testCase.credentialType,
tpe, testCase.credentialType,
"testCase: %d %v", i, testCase,
)
}