Sha256: a7d5605c709fb0bf0b781aa16d003cc856493008599c8384b180d44815d7eb5c
Contents?: true
Size: 1.16 KB
Versions: 5
Compression:
Stored size: 1.16 KB
Contents
require 'spec_helper' module Punchblock module Command describe Join do it 'registers itself' do RayoNode.class_from_registration(:join, 'urn:xmpp:rayo:1').should == Join end describe "when setting options in initializer" do subject { Join.new :other_call_id => 'abc123', :mixer_id => 'blah', :direction => :duplex, :media => :bridge } its(:other_call_id) { should == 'abc123' } its(:mixer_id) { should == 'blah' } its(:direction) { should == :duplex } its(:media) { should == :bridge } end describe "from a stanza" do let :stanza do <<-MESSAGE <join xmlns="urn:xmpp:rayo:1" call-id="abc123" mixer-id="blah" direction="duplex" media="bridge" /> MESSAGE end subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' } it { should be_instance_of Join } its(:other_call_id) { should == 'abc123' } its(:mixer_id) { should == 'blah' } its(:direction) { should == :duplex } its(:media) { should == :bridge } end end end end # Punchblock
Version data entries
5 entries across 5 versions & 1 rubygems