Sha256: c317e566c34d3eaec6e866ef68c97728726ff1c8f69d90104c1da87ca3ef0e51

Contents?: true

Size: 949 Bytes

Versions: 2

Compression:

Stored size: 949 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Punchblock
  module Command
    describe Unjoin do

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

      describe "when setting options in initializer" do
        subject { Unjoin.new :other_call_id => 'abc123', :mixer_name => 'blah' }

        its(:other_call_id) { should be == 'abc123' }
        its(:mixer_name)    { should be == 'blah' }
      end

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

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

        it { should be_instance_of Unjoin }

        its(:other_call_id) { should be == 'abc123' }
        its(:mixer_name)    { should be == 'blah' }
      end
    end
  end
end # Punchblock

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
punchblock-0.11.0 spec/punchblock/command/unjoin_spec.rb
punchblock-0.10.0 spec/punchblock/command/unjoin_spec.rb