Sha256: e2fc4042fd1f66d760749b034df5093799dd0878a8fc81ba3ff23f05414116d7

Contents?: true

Size: 956 Bytes

Versions: 23

Compression:

Stored size: 956 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Punchblock
  class Event
    describe Joined do
      it 'registers itself' do
        RayoNode.class_from_registration(:joined, 'urn:xmpp:rayo:1').should be == Joined
      end

      describe "from a stanza" do
        let(:stanza) { '<joined xmlns="urn:xmpp:rayo:1" call-id="b" mixer-name="m" />' }

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

        it { should be_instance_of Joined }

        it_should_behave_like 'event'

        its(:call_id)     { should be == 'b' }
        its(:mixer_name)  { should be == 'm' }
        its(:xmlns)       { should be == 'urn:xmpp:rayo:1' }
      end

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

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

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
punchblock-1.9.4 spec/punchblock/event/joined_spec.rb
punchblock-1.9.3 spec/punchblock/event/joined_spec.rb
punchblock-1.9.2 spec/punchblock/event/joined_spec.rb
punchblock-1.9.1 spec/punchblock/event/joined_spec.rb
punchblock-1.9.0 spec/punchblock/event/joined_spec.rb
punchblock-1.8.2 spec/punchblock/event/joined_spec.rb
punchblock-1.8.1 spec/punchblock/event/joined_spec.rb
punchblock-1.8.0 spec/punchblock/event/joined_spec.rb
punchblock-1.7.1 spec/punchblock/event/joined_spec.rb
punchblock-1.7.0 spec/punchblock/event/joined_spec.rb
punchblock-1.6.1 spec/punchblock/event/joined_spec.rb
punchblock-1.6.0 spec/punchblock/event/joined_spec.rb
punchblock-1.5.3 spec/punchblock/event/joined_spec.rb
punchblock-1.5.2 spec/punchblock/event/joined_spec.rb
punchblock-1.5.1 spec/punchblock/event/joined_spec.rb
punchblock-1.5.0 spec/punchblock/event/joined_spec.rb
punchblock-1.4.1 spec/punchblock/event/joined_spec.rb
punchblock-1.4.0 spec/punchblock/event/joined_spec.rb
punchblock-1.3.0 spec/punchblock/event/joined_spec.rb
punchblock-1.2.0 spec/punchblock/event/joined_spec.rb