Sha256: 067faf0d16716a1a53c9fa2cb13ce3d7d2dd053648bf698242d7e590124ae0f2

Contents?: true

Size: 599 Bytes

Versions: 6

Compression:

Stored size: 599 Bytes

Contents

require 'spec_helper'

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

      describe "from a stanza" do
        let(:stanza) { "<dtmf xmlns='urn:xmpp:rayo:1' signal='#' />" }

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

        it { should be_instance_of DTMF }

        it_should_behave_like 'event'

        its(:signal) { should == '#' }
        its(:xmlns) { should == 'urn:xmpp:rayo:1' }
      end
    end
  end
end # Punchblock

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
punchblock-0.5.1 spec/punchblock/event/dtmf_spec.rb
punchblock-0.5.0 spec/punchblock/event/dtmf_spec.rb
punchblock-0.4.3 spec/punchblock/event/dtmf_spec.rb
punchblock-0.4.2 spec/punchblock/event/dtmf_spec.rb
punchblock-0.4.1 spec/punchblock/event/dtmf_spec.rb
punchblock-0.4.0 spec/punchblock/event/dtmf_spec.rb