aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2011-08-18 18:20:07 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2011-08-18 18:20:07 +0100
commit3455b9a9f195e273e574989a0845ad8d2065e82f (patch)
tree51288d429d7e1adae7f5795e7ea3ada86b5d9445 /test
parente75e185bd348fd21fb62ba77f54d4f27755ba747 (diff)
Removed redundant notification test.
Diffstat (limited to 'test')
-rw-r--r--test/notification.rb57
1 files changed, 0 insertions, 57 deletions
diff --git a/test/notification.rb b/test/notification.rb
deleted file mode 100644
index 9cc3306..0000000
--- a/test/notification.rb
+++ /dev/null
@@ -1,57 +0,0 @@
-$: << "../lib/"
-
-require 'test/unit'
-require 'mauve/notification'
-
-# Test changes to notification things.
-class MauveNotificationTest < Test::Unit::TestCase
-
- def test_x_in_list_of_y
- mdr = Mauve::DuringRunner.new(Time.now)
- [
- [[0,1,3,4], 2, false],
- [[0,2,4,6], 2, true],
- [[0..1,3..6],2, false],
- [[0..2, 4,5],2, true],
- [[0,1..3], 2, true],
- ].each do |y,x,result|
- assert_equal(result, mdr.send(:x_in_list_of_y, x,y))
- end
- end
-
- def test_hours_in_day
- t = Time.gm(2010,1,2,3,4,5)
- # => Sat Jan 02 03:04:05 UTC 2010
- mdr = Mauve::DuringRunner.new(t)
- [
- [[0,1,3,4], true],
- [[0,2,4,6], false],
- [[[0,1,3],4], true],
- [[[0,2,4],6], false],
- [[0..1,3..6], true],
- [[0..2, 4,5], false],
- [[0,1..3], true],
- [[4..12], false]
- ].each do |hours, result|
- assert_equal(result, mdr.send(:hours_in_day, hours))
- end
- end
-
- def test_days_in_week
- t = Time.gm(2010,1,2,3,4,5)
- # => Sat Jan 02 03:04:05 UTC 2010
- mdr = Mauve::DuringRunner.new(t)
- [
- [[0,1,3,4], false],
- [[0,2,4,6], true],
- [[[0,1,3],4], false],
- [[[0,2,4],6], true],
- [[0..1,3..6], true],
- [[0..2, 4,5], false],
- [[0,1..3], false],
- [[4..6], true]
- ].each do |days, result|
- assert_equal(result, mdr.send(:days_in_week, days), "#{t.wday} in #{days.join(", ")}")
- end
- end
-end