Sha256: 3b7a89572b8218fee892cb26e26cdd68f4844174a58b9ba8baec804f6ac2f43b

Contents?: true

Size: 931 Bytes

Versions: 11

Compression:

Stored size: 931 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-id="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_id)      { 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_id => 'blah' }

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
punchblock-0.7.1 spec/punchblock/event/joined_spec.rb
punchblock-0.7.0 spec/punchblock/event/joined_spec.rb
punchblock-0.6.2 spec/punchblock/event/joined_spec.rb
punchblock-0.6.1 spec/punchblock/event/joined_spec.rb
punchblock-0.6.0 spec/punchblock/event/joined_spec.rb
punchblock-0.5.1 spec/punchblock/event/joined_spec.rb
punchblock-0.5.0 spec/punchblock/event/joined_spec.rb
punchblock-0.4.3 spec/punchblock/event/joined_spec.rb
punchblock-0.4.2 spec/punchblock/event/joined_spec.rb
punchblock-0.4.1 spec/punchblock/event/joined_spec.rb
punchblock-0.4.0 spec/punchblock/event/joined_spec.rb