spec/requests/host_request_spec.rb in rubix-0.1.1 vs spec/requests/host_request_spec.rb in rubix-0.1.2

- old
+ new

@@ -19,10 +19,12 @@ end it "can be created" do host = Rubix::Host.new(:name => 'rubix_spec_host_1', :host_groups => [@host_group_1]) host.save.should be_true + host.monitored.should be_true + host.use_ip.should be_true end end describe "when existing" do before do @@ -48,9 +50,19 @@ new_host.should_not be_nil new_host.host_groups.size.should == 2 new_host.host_groups.map(&:name).should include('rubix_spec_host_group_1', 'rubix_spec_host_group_2') end + it "can change its monitoring status" do + @host.monitored = false + @host.save + + new_host = Rubix::Host.find(:name => 'rubix_spec_host_1') + new_host.should_not be_nil + new_host.monitored.should be_false + new_host.status.should == :not_monitored + end + it "can change its templates" do @host.templates = [@template_1, @template_2] @host.save new_host = Rubix::Host.find(:name => 'rubix_spec_host_1')