Sha256: 776a628ca12aed2c591d93fba9e6ce1a6455f9880c0fbf7b9de1256ac79abc70

Contents?: true

Size: 1.03 KB

Versions: 14

Compression:

Stored size: 1.03 KB

Contents

# Unit tests for Bandwidth::Bxml::StreamParam
describe 'Bandwidth::Bxml::StreamParam' do
  let(:initial_attributes) {
    {
      name: 'initial_name',
      value: 'initial_value'
    }
  }

  let(:new_attributes) {
    {
      name: 'new_name',
      value: 'new_value'
    }
  }

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

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

    it 'tests the to_bxml method of the StreamParam instance' do
      expected = "\n<StreamParam name=\"initial_name\" value=\"initial_value\"/>\n"
      expect(instance.to_bxml).to eq(expected)
    end

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