spec/requests/item_request_spec.rb in rubix-0.5.8 vs spec/requests/item_request_spec.rb in rubix-0.5.9

- old
+ new

@@ -6,11 +6,10 @@ integration_test @host_group = ensure_save(Rubix::HostGroup.new(:name => 'rubix_spec_host_group_1')) @host_1 = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group], :ip => '123.123.123.123')) @host_2 = ensure_save(Rubix::Host.new(:name => 'rubix_spec_host_2', :host_groups => [@host_group], :ip => '123.123.123.124')) @app_1 = ensure_save(Rubix::Application.new(:name => 'rubix_spec_app_1', :host_id => @host_1.id)) - @app_2 = ensure_save(Rubix::Application.new(:name => 'rubix_spec_app_1', :host_id => @host_2.id)) end after do truncate_all_tables end @@ -47,11 +46,10 @@ @item.status = :disabled @item.frequency = 31 @item.multiply_by = 0.1 @item.host_id = @host_2.id @item.units = 'MB' - @item.applications = [@app_2] @item.save.should be_true Rubix::Item.find(:key => 'rubix.spec1', :host_id => @host_1.id).should be_nil new_item = Rubix::Item.find(:key => 'rubix.spec2', :host_id => @host_2.id) @@ -64,10 +62,9 @@ new_item.type.should == :external new_item.frequency.should == 31 new_item.multiply_by.should == 0.1 new_item.host.name.should == @host_2.name new_item.units.should == 'MB' - new_item.applications.map(&:name).should include(@app_2.name) end it "can be destroyed" do @item.destroy Rubix::Item.find(:key => 'rubix.spec1', :host_id => @host_1.id).should be_nil