Sha256: c10469fe1b913c9493b285645cb3573a02f977d0dca58ee757d2271e82df3c56

Contents?: true

Size: 1.03 KB

Versions: 16

Compression:

Stored size: 1.03 KB

Contents

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

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

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

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

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

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