Sha256: 803becccab7e6dbec716ed967403961bb90b804c81869d5d7c0c38f214c9a248

Contents?: true

Size: 935 Bytes

Versions: 9

Compression:

Stored size: 935 Bytes

Contents

require 'spec_helper'

module Punchblock
  class Event
    describe Joined do
      it 'registers itself' do
        RayoNode.class_from_registration(:joined, 'urn:xmpp:rayo:1').should == 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(:other_call_id) { should == 'b' }
        its(:mixer_name)    { should == 'm' }
        its(:xmlns)         { should == 'urn:xmpp:rayo:1' }
      end

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

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
punchblock-0.9.2 spec/punchblock/event/joined_spec.rb
punchblock-0.9.1 spec/punchblock/event/joined_spec.rb
punchblock-0.9.0 spec/punchblock/event/joined_spec.rb
punchblock-0.8.4 spec/punchblock/event/joined_spec.rb
punchblock-0.8.3 spec/punchblock/event/joined_spec.rb
punchblock-0.8.2 spec/punchblock/event/joined_spec.rb
punchblock-0.8.1 spec/punchblock/event/joined_spec.rb
punchblock-0.8.0 spec/punchblock/event/joined_spec.rb
punchblock-0.7.2 spec/punchblock/event/joined_spec.rb