holidays/test/defs/test_defs_nz.rb

22 lines
666 B
Ruby
Raw Normal View History

2010-03-28 21:52:00 +02:00
require File.dirname(__FILE__) + '/../test_helper'
# This file is generated by the Ruby Holiday gem.
#
# Definitions loaded: data/nz.yaml
class NzDefinitionTests < Test::Unit::TestCase # :nodoc:
def test_nz
{Date.civil(2007,1,1) => 'New Year\'s Day',
Date.civil(2007,1,2) => 'Day after New Year\'s Day',
Date.civil(2007,2,6) => 'Waitangi Day',
2010-03-28 21:52:00 +02:00
Date.civil(2007,4,6) => 'Good Friday',
Date.civil(2007,4,9) => 'Easter Monday',
Date.civil(2007,4,25) => 'ANZAC Day',
Date.civil(2007,12,25) => 'Christmas Day',
Date.civil(2007,12,26) => 'Boxing Day'}.each do |date, name|
2010-04-28 15:13:56 +02:00
assert_equal name, (Holidays.on(date, :nz, :informal)[0] || {})[:name]
2010-03-28 21:52:00 +02:00
end
end
end