@@ -689,9 +689,9 @@ def test_webrtc_generate_transfer_bxml_verb
689689 assert_equal ( expected , actual )
690690 end
691691
692- def test_start_and_stop_stream_bxml_verbs
693- start_stream_expected = '<?xml version="1.0" encoding="UTF-8"?><Response><StartStream destination="https://www.test.com/stream" name="test_stream" streamEventUrl="https://www.test.com/event" streamEventMethod="POST" username="username" password="password"/></Response>'
694- start_stream_response = Bandwidth ::Voice ::Response . new ( )
692+ def test_start_stream_bxml_verb
693+ expected = '<?xml version="1.0" encoding="UTF-8"?><Response><StartStream destination="https://www.test.com/stream" name="test_stream" streamEventUrl="https://www.test.com/event" streamEventMethod="POST" username="username" password="password"/></Response>'
694+ response = Bandwidth ::Voice ::Response . new ( )
695695 start_stream = Bandwidth ::Voice ::StartStream . new ( {
696696 :destination => "https://www.test.com/stream" ,
697697 :name => "test_stream" ,
@@ -700,16 +700,21 @@ def test_start_and_stop_stream_bxml_verbs
700700 :username => "username" ,
701701 :password => "password"
702702 } )
703- start_stream_response . push ( start_stream )
703+ response . push ( start_stream )
704+ actual = response . to_bxml ( )
705+
706+ assert_equal ( expected , actual )
707+ end
704708
705- stop_stream_expected = '<?xml version="1.0" encoding="UTF-8"?><Response><StopStream name="test_stream"/></Response>'
706- stop_stream_response = Bandwidth ::Voice ::Response . new ( )
709+ def test_stop_stream_bxml_verb
710+ expected = '<?xml version="1.0" encoding="UTF-8"?><Response><StopStream name="test_stream"/></Response>'
711+ response = Bandwidth ::Voice ::Response . new ( )
707712 stop_stream = Bandwidth ::Voice ::StopStream . new ( {
708713 :name => "test_stream"
709714 } )
710- stop_stream_response . push ( stop_stream )
715+ response . push ( stop_stream )
716+ actual = response . to_bxml ( )
711717
712- assert_equal ( start_stream_expected , start_stream_response . to_bxml ( ) )
713- assert_equal ( stop_stream_expected , stop_stream_response . to_bxml ( ) )
718+ assert_equal ( expected , actual )
714719 end
715720end
0 commit comments