Sha256: f932811fbd0a0839a3680640d864663daf3dd130023e2176a1e366db389ec88c

Contents?: true

Size: 1.19 KB

Versions: 15

Compression:

Stored size: 1.19 KB

Contents

# encoding: utf-8

require 'spec_helper'

module Punchblock
  module Command
    describe Join do

      it 'registers itself' do
        RayoNode.class_from_registration(:join, 'urn:xmpp:rayo:1').should be == Join
      end

      describe "when setting options in initializer" do
        subject { Join.new :call_id => 'abc123', :mixer_name => 'blah', :direction => :duplex, :media => :bridge }

        its(:call_id)     { should be == 'abc123' }
        its(:mixer_name)  { should be == 'blah' }
        its(:direction)   { should be == :duplex }
        its(:media)       { should be == :bridge }
      end

      describe "from a stanza" do
        let :stanza do
          <<-MESSAGE
<join xmlns="urn:xmpp:rayo:1"
      call-id="abc123"
      mixer-name="blah"
      direction="duplex"
      media="bridge" />
          MESSAGE
        end

        subject { RayoNode.import parse_stanza(stanza).root, '9f00061', '1' }

        it { should be_instance_of Join }

        its(:call_id)     { should be == 'abc123' }
        its(:mixer_name)  { should be == 'blah' }
        its(:direction)   { should be == :duplex }
        its(:media)       { should be == :bridge }
      end
    end
  end
end # Punchblock

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
punchblock-1.7.1 spec/punchblock/command/join_spec.rb
punchblock-1.7.0 spec/punchblock/command/join_spec.rb
punchblock-1.6.1 spec/punchblock/command/join_spec.rb
punchblock-1.6.0 spec/punchblock/command/join_spec.rb
punchblock-1.5.3 spec/punchblock/command/join_spec.rb
punchblock-1.5.2 spec/punchblock/command/join_spec.rb
punchblock-1.5.1 spec/punchblock/command/join_spec.rb
punchblock-1.5.0 spec/punchblock/command/join_spec.rb
punchblock-1.4.1 spec/punchblock/command/join_spec.rb
punchblock-1.4.0 spec/punchblock/command/join_spec.rb
punchblock-1.3.0 spec/punchblock/command/join_spec.rb
punchblock-1.2.0 spec/punchblock/command/join_spec.rb
punchblock-1.1.0 spec/punchblock/command/join_spec.rb
punchblock-1.0.0 spec/punchblock/command/join_spec.rb
punchblock-0.12.0 spec/punchblock/command/join_spec.rb