Sha256: df0cf0c9090c1272cf81c32b95039915e118b15833128a1e28cc768a670f6324

Contents?: true

Size: 1.02 KB

Versions: 16

Compression:

Stored size: 1.02 KB

Contents

# Unit tests for Bandwidth::Bxml::SendDtmf
describe 'Bandwidth::Bxml::SendDtmf' do
  let(:initial_attributes) {
    {
      tone_duration: 5,
      tone_interval: 5
    }
  }

  let(:new_attributes) {
    {
      tone_duration: 10,
      tone_interval: 10
    }
  }

  let(:instance) { Bandwidth::Bxml::SendDtmf.new('1234', initial_attributes) }

  describe 'test an instance of SendDtmf' do
    it 'validates instance of SendDtmf' do
      expect(instance).to be_instance_of(Bandwidth::Bxml::SendDtmf)
      expect(instance).to be_a(Bandwidth::Bxml::Verb)
    end

    it 'tests the to_bxml method of the SendDtmf instance' do
      expected = "\n<SendDtmf toneDuration=\"5\" toneInterval=\"5\">1234</SendDtmf>\n"
      expect(instance.to_bxml).to eq(expected)
    end

    it 'tests the set_attributes method of the SendDtmf instance' do
      instance.set_attributes(new_attributes)
      expected = "\n<SendDtmf toneDuration=\"10\" toneInterval=\"10\">1234</SendDtmf>\n"
      expect(instance.to_bxml).to eq(expected)
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
bandwidth-sdk-13.1.4 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-13.1.3 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-13.1.2 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-13.1.1 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-13.1.0 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-13.0.0 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-12.1.0 spec/unit/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.3.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.2.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.1.1 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.1.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.0.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.0.0.pre.beta.4.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.1 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.0 spec/models/bxml/verbs/send_dtmf_spec.rb
bandwidth-sdk-11.0.0.pre.beta.2.0 spec/models/bxml/verbs/send_dtmf_spec.rb