Revision c6c217d4 src/oca/ruby/test/VirtualNetwork_spec.rb

View differences:

src/oca/ruby/test/VirtualNetwork_spec.rb
47 47
            @vnet['LEASES/LEASE/IP'].should eql('192.168.0.1')
48 48
            @vnet['LEASES/LEASE/USED'].should eql('1')
49 49
        end
50

  
51
        it "should get a hash representation of the VNET" do
52
            vnet_hash = @vnet.to_hash
53
            vnet_hash['VNET']['NAME'].should eql('Red LAN')
54
            vnet_hash['VNET']['BRIDGE'].should eql('vbr0')
55
            vnet_hash['VNET']['TEMPLATE']['NETWORK_ADDRESS'].should eql('192.168.0.0')
56
            vnet_hash['VNET']['ID'].should eql('3')
57
            vnet_hash['VNET']['NAME'].should eql('Red LAN')
58
            vnet_hash['VNET']['BRIDGE'].should eql('vbr0')
59
            vnet_hash['VNET']['TEMPLATE']['NETWORK_ADDRESS'].should eql('192.168.0.0')
60
            vnet_hash['VNET']['TEMPLATE']['TYPE'].should eql('RANGED')
61
            vnet_hash['VNET']['LEASES']['LEASE']['IP'].should eql('192.168.0.1')
62
            vnet_hash['VNET']['LEASES']['LEASE']['USED'].should eql('1')
63
        end
64 50
    end
65 51

  
66 52
    describe "VirtualNetwork using REXML" do
......
105 91
            @vnet['LEASES/LEASE/IP'].should eql('192.168.0.1')
106 92
            @vnet['LEASES/LEASE/USED'].should eql('1')
107 93
        end
108

  
109
        it "should get a hash representation of the VNET" do
110
            vnet_hash = @vnet.to_hash
111
            vnet_hash['VNET']['NAME'].should eql('Red LAN')
112
            vnet_hash['VNET']['BRIDGE'].should eql('vbr0')
113
            vnet_hash['VNET']['TEMPLATE']['NETWORK_ADDRESS'].should eql('192.168.0.0')
114
            vnet_hash['VNET']['ID'].should eql('3')
115
            vnet_hash['VNET']['NAME'].should eql('Red LAN')
116
            vnet_hash['VNET']['BRIDGE'].should eql('vbr0')
117
            vnet_hash['VNET']['TEMPLATE']['NETWORK_ADDRESS'].should eql('192.168.0.0')
118
            vnet_hash['VNET']['TEMPLATE']['TYPE'].should eql('RANGED')
119
            vnet_hash['VNET']['LEASES']['LEASE']['IP'].should eql('192.168.0.1')
120
            vnet_hash['VNET']['LEASES']['LEASE']['USED'].should eql('1')
121
        end
122 94
    end
123 95

  
124 96

  

Also available in: Unified diff