spec/lib/flapjack/gateways/web_spec.rb in flapjack-1.1.0 vs spec/lib/flapjack/gateways/web_spec.rb in flapjack-1.2.0rc1

- old
+ new

@@ -42,11 +42,11 @@ end def expect_entity_stats expect(Flapjack::Data::Entity).to receive(:all). with(:enabled => true, :redis => redis).and_return([entity_name]) - expect(Flapjack::Data::Entity).to receive(:find_all_with_failing_checks). + expect(Flapjack::Data::Entity).to receive(:find_all_names_with_failing_checks). with(:redis => redis).and_return([entity_name]) end def expect_entity_check_status(ec) time = Time.now.to_i @@ -118,11 +118,11 @@ # TODO add data, test that pages contain representations of it # (for the methods that access redis directly) it "shows a page listing all checks" do #redis.should_receive(:keys).with('*:*:states').and_return(["#{entity_name}:#{check}"]) - expect(Flapjack::Data::EntityCheck).to receive(:find_current_by_entity). + expect(Flapjack::Data::EntityCheck).to receive(:find_current_names_by_entity). with(:redis => redis).and_return({entity_name => [check]}) expect_check_stats expect_entity_check_status(entity_check) @@ -144,10 +144,10 @@ expect_entity_check_status(entity_check) expect(Flapjack::Data::Entity).to receive(:find_by_name). with(entity_name, :redis => redis).and_return(entity) - expect(Flapjack::Data::EntityCheck).to receive(:find_current_failing_by_entity). + expect(Flapjack::Data::EntityCheck).to receive(:find_current_names_failing_by_entity). with(:redis => redis).and_return({entity_name => [check]}) expect(Flapjack::Data::EntityCheck).to receive(:for_entity). with(entity, 'ping', :redis => redis).and_return(entity_check) aget '/checks_failing'