spec/punchblock/translator/asterisk_spec.rb in punchblock-0.10.0 vs spec/punchblock/translator/asterisk_spec.rb in punchblock-0.11.0
- old
+ new
@@ -130,11 +130,11 @@
end
context "with an unknown call ID" do
it 'sends an error in response to the command' do
subject.execute_call_command command
- command.response.should be == ProtocolError.new('call-not-found', "Could not find a call with ID #{call_id}", call_id, nil)
+ command.response.should be == ProtocolError.new.setup('call-not-found', "Could not find a call with ID #{call_id}", call_id, nil)
end
end
end
describe '#execute_component_command' do
@@ -159,11 +159,11 @@
end
context "with an unknown component ID" do
it 'sends an error in response to the command' do
subject.execute_component_command command
- command.response.should be == ProtocolError.new('component-not-found', "Could not find a component with ID #{component_id}", nil, component_id)
+ command.response.should be == ProtocolError.new.setup('component-not-found', "Could not find a component with ID #{component_id}", nil, component_id)
end
end
end
describe '#execute_global_command' do
@@ -216,10 +216,10 @@
Command::Answer.new
end
it 'sends an error in response to the command' do
subject.execute_command command
- command.response.should be == ProtocolError.new('command-not-acceptable', "Did not understand command")
+ command.response.should be == ProtocolError.new.setup('command-not-acceptable', "Did not understand command")
end
end
end
describe '#handle_pb_event' do