prepare for multiplexed snowflake (#11)

This commit is contained in:
Serene Han 2016-03-12 22:29:56 -08:00
parent 6b5a36ac84
commit 5e318b6219
4 changed files with 20 additions and 19 deletions

View file

@ -49,10 +49,10 @@ describe 'Snowflake', ->
it 'receives SDP offer', ->
s = new Snowflake(new FakeBroker(), fakeUI)
s.proxyPair = { receiveWebRTCOffer: -> }
spyOn(s.proxyPair, 'receiveWebRTCOffer').and.returnValue true
s.proxyPairs[0] = { receiveWebRTCOffer: -> }
spyOn(s.proxyPairs[0], 'receiveWebRTCOffer').and.returnValue true
spyOn(s, 'sendAnswer')
s.receiveOffer 'foo'
s.receiveOffer { 'type': 'offer', 'sdp': 'foo' }
expect(s.sendAnswer).toHaveBeenCalled()
it 'can make a proxypair', ->