Sha256: 33414517cbef84fd229297ecb9e2bac53caf6efd105c308ac7d83d6f65b6d4f5

Contents?: true

Size: 958 Bytes

Versions: 14

Compression:

Stored size: 958 Bytes

Contents

# Unit tests for Bandwidth::Bxml::Ring
describe 'Bandwidth::Bxml::Ring' do
  let(:initial_attributes) {
    {
      duration: 5.0,
      answer_call: true
    }
  }

  let(:new_attributes) {
    {
      duration: 10.0,
      answer_call: false
    }
  }

  let(:instance) { Bandwidth::Bxml::Ring.new(initial_attributes) }

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

    it 'tests the to_bxml method of the Ring instance' do
      expected = "\n<Ring duration=\"5.0\" answerCall=\"true\"/>\n"
      expect(instance.to_bxml).to eq(expected)
    end

    it 'tests the set_attributes method of the Ring instance' do
      instance.set_attributes(new_attributes)
      expected = "\n<Ring duration=\"10.0\" answerCall=\"false\"/>\n"
      expect(instance.to_bxml).to eq(expected)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

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