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

@@ -112,3 +112,12 @@ func TestICEServer_validate(t *testing.T) {
}
})
}
func TestICEServerZeroValue(t *testing.T) {
server := ICEServer{
URLs: []string{"turn:galene.org:1195"},
Username: "galene",
Credential: "secret",
}
assert.Equal(t, server.CredentialType, ICECredentialTypePassword)
}