commit 26f5caf4047136004e155e70d8794264c58cd9e2
Author: Serene Han <[email protected]>
Date:   Sat Feb 20 16:11:43 2016 -0800

    add ReceiveAnswer test to client
---
 client/client_test.go | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/client/client_test.go b/client/client_test.go
index 85c2144..14e9393 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -51,6 +51,17 @@ func TestConnect(t *testing.T) {
                                So(mock.destination.Bytes(), ShouldResemble, 
[]byte("test"))
                        })
 
+                       Convey("Receive answer sets remote description", func() 
{
+                               c.answerChannel = make(chan 
*webrtc.SessionDescription)
+                               c.config = webrtc.NewConfiguration()
+                               c.PreparePeerConnection()
+                               c.ReceiveAnswer()
+                               sdp := 
webrtc.DeserializeSessionDescription("test")
+                               c.answerChannel <- sdp
+                               So(c.pc.RemoteDescription(), ShouldEqual, sdp)
+
+                       })
+
                        Convey("Receive answer fails on nil answer", func() {
                                c.reset = make(chan struct{})
                                c.answerChannel = make(chan 
*webrtc.SessionDescription)



_______________________________________________
tor-commits mailing list
[email protected]
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits

Reply via email to