aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2013-05-14 13:42:41 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2013-05-14 13:42:41 +0100
commite08051b78bae61dd42b48f4f8d9d086823ddbd2a (patch)
tree11637803fbfb33e7637e2e35af780773d83ca53c /test
parent829a59b0a2a0b470781b8ebd44481c02fb049421 (diff)
Database now queried to work out if a notification should be suppressed.
Diffstat (limited to 'test')
-rw-r--r--test/tc_mauve_configuration_builders_person.rb6
-rw-r--r--test/tc_mauve_person.rb2
2 files changed, 3 insertions, 5 deletions
diff --git a/test/tc_mauve_configuration_builders_person.rb b/test/tc_mauve_configuration_builders_person.rb
index 48ceafd..76841a3 100644
--- a/test/tc_mauve_configuration_builders_person.rb
+++ b/test/tc_mauve_configuration_builders_person.rb
@@ -65,9 +65,9 @@ EOF
assert_kind_of(Proc, person.normal)
assert_kind_of(Proc, person.urgent)
- assert_kind_of(Hash, person.notification_thresholds)
- assert_equal(1,person.notification_thresholds.keys.length)
- assert(person.notification_thresholds.all?{|k,v| k.is_a?(Integer) and v.is_a?(Array)})
+ assert_kind_of(Hash, person.suppress_notifications_after)
+ assert_equal(1,person.suppress_notifications_after.keys.length)
+ assert(person.suppress_notifications_after.all?{|k,v| k.is_a?(Integer) and v.is_a?(Integer)})
assert_kind_of(Array, person.notifications)
assert_equal(1, person.notifications.length)
diff --git a/test/tc_mauve_person.rb b/test/tc_mauve_person.rb
index 9e6f9ac..14798f1 100644
--- a/test/tc_mauve_person.rb
+++ b/test/tc_mauve_person.rb
@@ -97,7 +97,6 @@ EOF
# Pop the notification off the buffer.
#
notification_buffer.pop
- assert_equal(Time.now, person.notification_thresholds[60][-1], "Notification thresholds not updated at #{Time.now}.")
else
assert_equal(0, notification_buffer.length, "Notification sent when it should not have been at #{Time.now}.")
end
@@ -176,7 +175,6 @@ EOF
# Pop the notification off the buffer.
#
notification_buffer.pop
- assert_equal(Time.now, person.notification_thresholds[60][-1], "Notification thresholds not updated at #{Time.now}.")
else
assert_equal(0, notification_buffer.length, "Notification sent when it should not have been at #{Time.now}.")
end