spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb in punchblock-2.5.0 vs spec/punchblock/translator/asterisk/component/asterisk/agi_command_spec.rb in punchblock-2.5.1
- old
+ new
@@ -157,12 +157,12 @@
end
context "when the PUNCHBLOCK_END_ON_ASYNCAGI_BREAK channel var is set" do
let(:chan_var) { 'true' }
- it 'should send an end (hangup) event to the translator' do
- expected_end_event = Punchblock::Event::End.new reason: :hangup,
+ it 'should send an end (hungup) event to the translator' do
+ expected_end_event = Punchblock::Event::End.new reason: :hungup,
platform_code: 16,
target_call_id: mock_call.id
translator.should_receive(:handle_pb_event).once.with kind_of(Punchblock::Event::Complete)
translator.should_receive(:handle_pb_event).once.with expected_end_event
@@ -179,10 +179,10 @@
"Result" => "200%20result=123%20(timeout)%0A",
'Timestamp' => '1393368380.572575'
end
it "should use the AMI timestamp for the Rayo event" do
- expected_end_event = Punchblock::Event::End.new reason: :hangup,
+ expected_end_event = Punchblock::Event::End.new reason: :hungup,
platform_code: 16,
target_call_id: mock_call.id,
timestamp: DateTime.new(2014, 2, 25, 22, 46, 20)
translator.should_receive(:handle_pb_event).once.with kind_of(Punchblock::Event::Complete)
translator.should_receive(:handle_pb_event).once.with expected_end_event