Files
ice/usecandidate_test.go
Pion d3e1775d73 Update CI configs to v0.4.7
Update lint scripts and CI configs.
2020-09-26 08:54:24 -07:00

25 lines
436 B
Go

package ice
import (
"testing"
"github.com/pion/stun"
)
func TestUseCandidateAttr_AddTo(t *testing.T) {
m := new(stun.Message)
if UseCandidate().IsSet(m) {
t.Error("should not be set")
}
if err := m.Build(stun.BindingRequest, UseCandidate()); err != nil {
t.Error(err)
}
m1 := new(stun.Message)
if _, err := m1.Write(m.Raw); err != nil {
t.Error(err)
}
if !UseCandidate().IsSet(m1) {
t.Error("should be set")
}
}