Sha256: d1c11d3a667a443baed080a3359ab86ecbb4e6b009b91fc965cafe1cc4a5058a

Contents?: true

Size: 868 Bytes

Versions: 14

Compression:

Stored size: 868 Bytes

Contents

# Unit tests for Bandwidth::Bxml::Pause
describe 'Bandwidth::Bxml::Pause' do
  let(:initial_attributes) {
    {
      duration: 5
    }
  }

  let(:new_attributes) {
    {
      duration: 10
    }
  }

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

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

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

    it 'tests the set_attributes method of the Pause instance' do
      instance.set_attributes(new_attributes)
      expected = "\n<Pause duration=\"10\"/>\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/pause_spec.rb
bandwidth-sdk-13.1.1 spec/unit/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-13.1.0 spec/unit/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-13.0.0 spec/unit/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-12.1.0 spec/unit/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.3.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.2.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.1.1 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.1.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.0.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.0.0.pre.beta.4.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.1 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.0 spec/models/bxml/verbs/pause_spec.rb
bandwidth-sdk-11.0.0.pre.beta.2.0 spec/models/bxml/verbs/pause_spec.rb