spec/punchblock/component/component_node_spec.rb in punchblock-2.0.1 vs spec/punchblock/component/component_node_spec.rb in punchblock-2.0.2
- old
+ new
@@ -69,29 +69,30 @@
before do
subject.request!
subject.client = Client.new
end
- let(:component_id) { 'abc123' }
+ let(:uri) { 'xmpp:callid@server/abc123' }
let :ref do
- Ref.new uri: component_id
+ Ref.new uri: uri
end
it "should set the component ID from the ref" do
subject.response = ref
- subject.component_id.should be == component_id
- subject.client.find_component_by_id(component_id).should be subject
+ subject.component_id.should be == 'abc123'
+ subject.source_uri.should be == uri
+ subject.client.find_component_by_uri(uri).should be subject
end
end
describe "#complete_event=" do
before do
subject.request!
subject.client = Client.new
subject.response = Ref.new uri: 'abc'
- subject.client.find_component_by_id('abc').should be subject
+ subject.client.find_component_by_uri('abc').should be subject
end
it "should set the command to executing status" do
subject.complete_event = :foo
subject.should be_complete
@@ -103,10 +104,10 @@
subject.complete_event(0.5).should be == :foo
end
it "should remove the component from the registry" do
subject.complete_event = :foo
- subject.client.find_component_by_id('abc').should be_nil
+ subject.client.find_component_by_uri('abc').should be_nil
end
end
end # ComponentNode
end # Component
end # Punchblock