Sha256: db81723531fdd7c11cce812b33384d76a8b01e504d77b39e242bd8b9afb7f63a

Contents?: true

Size: 1.38 KB

Versions: 14

Compression:

Stored size: 1.38 KB

Contents

# Unit tests for Bandwidth::Bxml::StartGather
describe 'Bandwidth::Bxml::StartGather' do
  let(:initial_attributes) {
    {
      dtmf_url: 'https://initial.com',
      dtmf_method: 'POST',
      username: 'initial_username',
      password: 'initial_password',
      tag: 'initial_tag'
    }
  }

  let(:new_attributes) {
    {
      dtmf_url: 'https://new.com',
      dtmf_method: 'GET',
      username: 'new_username',
      password: 'new_password',
      tag: 'new_tag'
    }
  }

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

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

    it 'tests the to_bxml method of the StartGather instance' do
      expected = "\n<StartGather dtmfUrl=\"https://initial.com\" dtmfMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" tag=\"initial_tag\"/>\n"
      expect(instance.to_bxml).to eq(expected)
    end

    it 'tests the set_attributes method of the StartGather instance' do
      instance.set_attributes(new_attributes)
      expected = "\n<StartGather dtmfUrl=\"https://new.com\" dtmfMethod=\"GET\" username=\"new_username\" password=\"new_password\" tag=\"new_tag\"/>\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/start_gather_spec.rb
bandwidth-sdk-13.1.1 spec/unit/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-13.1.0 spec/unit/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-13.0.0 spec/unit/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-12.1.0 spec/unit/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.3.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.2.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.1.1 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.1.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.0.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.0.0.pre.beta.4.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.1 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.0.0.pre.beta.3.0 spec/models/bxml/verbs/start_gather_spec.rb
bandwidth-sdk-11.0.0.pre.beta.2.0 spec/models/bxml/verbs/start_gather_spec.rb