Sha256: f35b7a8760865f1deface9003d108403a5292508f93d3c40250dd1de0841a290

Contents?: true

Size: 911 Bytes

Versions: 5

Compression:

Stored size: 911 Bytes

Contents

require 'spec_helper'

module Punchblock
  module Command
    describe Unjoin do

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

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

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

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

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

        it { should be_instance_of Unjoin }

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
punchblock-0.7.1 spec/punchblock/command/unjoin_spec.rb
punchblock-0.7.0 spec/punchblock/command/unjoin_spec.rb
punchblock-0.6.2 spec/punchblock/command/unjoin_spec.rb
punchblock-0.6.1 spec/punchblock/command/unjoin_spec.rb
punchblock-0.6.0 spec/punchblock/command/unjoin_spec.rb