spec/beaker/host/cisco_spec.rb in beaker-4.3.0 vs spec/beaker/host/cisco_spec.rb in beaker-4.4.0

- old
+ new

@@ -105,18 +105,26 @@ context 'for cisco_nexus-7' do before :each do @platform = 'cisco_nexus-7-x86_64' + @options = { :user => 'non_root' } end it 'appends `"` for commands' do answer_correct = '"' answer_test = host.append_commands( 'fake_command' ) expect( answer_test ).to be === answer_correct end + it 'returns nil for root user commands' do + @options = { :user => 'root' } + answer_correct = nil + answer_test = host.append_commands( 'fake_command' ) + expect( answer_test ).to be === answer_correct + end + it 'returns nil when vsh command' do answer_correct = nil answer_test = host.append_commands( '/isan/bin/vsh -c foo' ) expect( answer_test ).to be === answer_correct end @@ -136,13 +144,21 @@ context 'for cisco_ios_xr-6' do before :each do @platform = 'cisco_ios_xr-6-x86_64' + @options = { :user => 'non_root' } end it 'appends `"` for commands' do answer_correct = '"' + answer_test = host.append_commands( 'fake_command' ) + expect( answer_test ).to be === answer_correct + end + + it 'returns nil for root user commands' do + @options = { :user => 'root' } + answer_correct = nil answer_test = host.append_commands( 'fake_command' ) expect( answer_test ).to be === answer_correct end it 'returns nil when vsh command' do