diff options
| author | Darryl L. Pierce <dpierce@redhat.com> | 2008-08-13 13:09:27 -0400 |
|---|---|---|
| committer | Darryl L. Pierce <dpierce@redhat.com> | 2008-08-14 08:27:27 -0400 |
| commit | d7d731ffa00bbd50a49750940006ab53f6cad2fa (patch) | |
| tree | 332a1493de538d1b2c6ae902fc8fcfcabc80f547 /contrib/ruby/test | |
| parent | 5ec6348575e18f942902fc039cca24480d14984b (diff) | |
| download | cobbler-d7d731ffa00bbd50a49750940006ab53f6cad2fa.tar.gz cobbler-d7d731ffa00bbd50a49750940006ab53f6cad2fa.tar.xz cobbler-d7d731ffa00bbd50a49750940006ab53f6cad2fa.zip | |
The auth_token is now cached as Cobbler::Base@@auth_token.
Also fixed up some documentation and how properties are handled that
are either arrays of values or hashes.
Diffstat (limited to 'contrib/ruby/test')
| -rw-r--r-- | contrib/ruby/test/test_system.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/ruby/test/test_system.rb b/contrib/ruby/test/test_system.rb index cc64e846..e28da8bf 100644 --- a/contrib/ruby/test/test_system.rb +++ b/contrib/ruby/test/test_system.rb @@ -44,7 +44,7 @@ module Cobbler @profile = 'profile1' @nics = Array.new @nic_details = {'mac_address' => '00:11:22:33:44:55:66:77'} - @nic = NetworkInterface.new(['intf0',@nic_details]) + @nic = NetworkInterface.new(@nic_details) @nics << @nic @systems = Array.new @@ -103,11 +103,11 @@ module Cobbler @connection.should_receive(:call).with('get_systems').once.returns(@systems) result = System.find - + assert result, 'Expected a result set.' assert_equal 2, result.size, 'Did not receive the right number of results.' assert_equal 2, result[0].interfaces.size, 'Did not parse the NICs correctly.' - result[0].interfaces.collect do |nic| assert_equal "00:11:22:33:44:55", nic.mac_address end + result[0].interfaces.keys.each { |intf| assert_equal "00:11:22:33:44:55", result[0].interfaces[intf].mac_address } assert_equal 3, result[0].owners.size, 'Did not parse the owners correctly.' end |
