spec/lib/flapjack/data/contact_spec.rb in flapjack-1.2.0rc2 vs spec/lib/flapjack/data/contact_spec.rb in flapjack-1.2.0

- old
+ new

@@ -216,10 +216,15 @@ :redis => @redis) ec = Flapjack::Data::EntityCheck.for_entity_name(entity_name, 'PING', :redis => @redis) t = Time.now.to_i ec.update_state('ok', :timestamp => t, :summary => 'a') - ec.last_update = t + # was check.last_update= + @redis.hset("check:#{entity_name}:PING", 'last_update', t) + @redis.zadd("all_checks", t, @key) + @redis.zadd("all_checks:#{entity_name}", t, 'PING') + @redis.zadd("current_checks:#{entity_name}", t, 'PING') + @redis.zadd('current_entities', t, entity_name) contact = Flapjack::Data::Contact.find_by_id('c362', :redis => @redis) eandcs = contact.entities(:checks => true) expect(eandcs).not_to be_nil expect(eandcs).to be_an(Array)