spec/lib/flapjack/data/contact_spec.rb in flapjack-0.7.20 vs spec/lib/flapjack/data/contact_spec.rb in flapjack-0.7.21

- old
+ new

@@ -4,15 +4,16 @@ require 'ice_cube' require 'flapjack/data/contact' require 'flapjack/data/entity_check' require 'flapjack/data/notification_rule' +require 'flapjack/data/tag_set' describe Flapjack::Data::Contact, :redis => true do let(:notification_rule_data) { - {:entity_tags => ["database","physical"], + {:tags => ["database","physical"], :entities => ["foo-app-01.example.com"], :time_restrictions => [], :warning_media => ["email"], :critical_media => ["sms", "email"], :warning_blackhole => false, @@ -20,11 +21,11 @@ } } let(:general_notification_rule_data) { {:entities => [], - :entity_tags => [], + :tags => Flapjack::Data::TagSet.new([]), :time_restrictions => [], :warning_media => ['email', 'sms', 'jabber', 'pagerduty'], :critical_media => ['email', 'sms', 'jabber', 'pagerduty'], :warning_blackhole => false, :critical_blackhole => false} @@ -154,10 +155,10 @@ @redis.smembers("contact_notification_rules:363").should be_empty rules = contact.notification_rules rules.should have(1).rule rule = rules.first - [:entities, :entity_tags, :time_restrictions, + [:entities, :tags, :time_restrictions, :warning_media, :critical_media, :warning_blackhole, :critical_blackhole].each do |k| rule.send(k).should == general_notification_rule_data[k] end end