Include answer channel as part of the webRTCConn struct (#12)

This commit is contained in:
Serene Han 2016-02-17 20:41:33 -08:00
parent e35687b587
commit a1b7e01c54
2 changed files with 52 additions and 30 deletions

View file

@ -2,6 +2,7 @@ package main
import (
"bytes"
"github.com/keroserene/go-webrtc"
. "github.com/smartystreets/goconvey/convey"
"testing"
)
@ -41,8 +42,9 @@ func TestConnect(t *testing.T) {
Convey("Receive answer fails on nil answer", func() {
c.reset = make(chan struct{})
c.answerChannel = make(chan *webrtc.SessionDescription)
c.ReceiveAnswer()
answerChannel <- nil
c.answerChannel <- nil
<-c.reset
})