Changeset 271

Show
Ignore:
Timestamp:
10/12/08 23:44:35 (3 months ago)
Author:
pwh
Message:

Implemented checking for has_inventory?

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nethorus/spec/models/devices_spec.rb

    r259 r271  
    3030describe Device do 
    3131 
     32  fixtures :devices, :l2_interfaces 
     33 
    3234  it "should not be valid when first created" do 
    3335    device = Device.new 
     
    234236  end 
    235237 
     238  it "should report an inventory through has_inventory correctly" do 
     239    device = devices(:test_device_1) 
     240    device.has_inventory?.should be_true 
     241     
     242    device = devices(:test_device_with_no_inventory) 
     243    device.has_inventory?.should be_false 
     244  end 
     245 
    236246end