spec/punchblock/translator/asterisk/call_spec.rb in punchblock-2.5.0 vs spec/punchblock/translator/asterisk/call_spec.rb in punchblock-2.5.1
- old
+ new
@@ -301,11 +301,11 @@
comp_command.request!
component = subject.execute_command comp_command
comp_command.response(0.1).should be_a Ref
expected_complete_event = Punchblock::Event::Complete.new :target_call_id => subject.id, :component_id => component.id, source_uri: component.id
expected_complete_event.reason = Punchblock::Event::Complete::Hangup.new
- expected_end_event = Punchblock::Event::End.new :reason => :hangup, platform_code: cause, :target_call_id => subject.id
+ expected_end_event = Punchblock::Event::End.new :reason => :hungup, platform_code: cause, :target_call_id => subject.id
translator.should_receive(:handle_pb_event).with(expected_complete_event).once.ordered
translator.should_receive(:handle_pb_event).with(expected_end_event).once.ordered
subject.process_ami_event ami_event
end
@@ -336,11 +336,11 @@
'Channel' => "SIP/1234-00000000",
'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: cause,
target_call_id: subject.id,
timestamp: DateTime.new(2014, 2, 25, 22, 46, 20)
translator.should_receive(:handle_pb_event).with expected_end_event
@@ -368,12 +368,12 @@
context "with an undefined cause" do
let(:cause) { '0' }
let(:cause_txt) { 'Undefined' }
- 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: cause,
:target_call_id => subject.id
translator.should_receive(:handle_pb_event).with expected_end_event
subject.process_ami_event ami_event
end
@@ -381,11 +381,11 @@
context "with a normal clearing cause" do
let(:cause) { '16' }
let(:cause_txt) { 'Normal Clearing' }
- 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: cause,
:target_call_id => subject.id
translator.should_receive(:handle_pb_event).with expected_end_event
subject.process_ami_event ami_event
end