Sha256: 4929846063c50817ba46120ee77fe3342e8fb44bf5de181e02c4ad4b71ff19e3
Contents?: true
Size: 1.17 KB
Versions: 19
Compression:
Stored size: 1.17 KB
Contents
# Unit tests for Bandwidth::Bxml::PlayAudio describe 'Bandwidth::Bxml::PlayAudio' do let(:initial_attributes) { { username: 'initial_username', password: 'initial_password' } } let(:new_attributes) { { username: 'new_username', password: 'new_password' } } let(:instance) { Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav', initial_attributes) } describe 'test an instance of PlayAudio' do it 'validates instance of PlayAudio' do expect(instance).to be_instance_of(Bandwidth::Bxml::PlayAudio) expect(instance).to be_a(Bandwidth::Bxml::Verb) end it 'tests the to_bxml method of the PlayAudio instance' do expected = "\n<PlayAudio username=\"initial_username\" password=\"initial_password\">https://audio.url/audio1.wav</PlayAudio>\n" expect(instance.to_bxml).to eq(expected) end it 'tests the set_attributes method of the PlayAudio instance' do instance.set_attributes(new_attributes) expected = "\n<PlayAudio username=\"new_username\" password=\"new_password\">https://audio.url/audio1.wav</PlayAudio>\n" expect(instance.to_bxml).to eq(expected) end end end
Version data entries
19 entries across 19 versions & 1 rubygems