2010-11-12 21:45:12 +01:00
|
|
|
# encoding: utf-8
|
|
|
|
require File.expand_path(File.dirname(__FILE__)) + '/../test_helper'
|
2008-12-30 20:43:29 +01:00
|
|
|
|
|
|
|
# This file is generated by the Ruby Holiday gem.
|
|
|
|
#
|
|
|
|
# Definitions loaded: data/za.yaml
|
|
|
|
class ZaDefinitionTests < Test::Unit::TestCase # :nodoc:
|
|
|
|
|
|
|
|
def test_za
|
|
|
|
{Date.civil(2007,1,1) => 'New Year\'s Day',
|
|
|
|
Date.civil(2007,3,21) => 'Human Rights Day',
|
|
|
|
Date.civil(2007,4,6) => 'Good Friday',
|
|
|
|
Date.civil(2007,4,9) => 'Family Day',
|
|
|
|
Date.civil(2007,4,27) => 'Freedom Day',
|
|
|
|
Date.civil(2007,5,1) => 'Workers Day',
|
|
|
|
Date.civil(2007,6,16) => 'Youth Day',
|
|
|
|
Date.civil(2007,8,9) => 'National Women\'s Day',
|
|
|
|
Date.civil(2007,9,24) => 'Heritage Day',
|
|
|
|
Date.civil(2007,12,16) => 'Day of Reconciliation',
|
|
|
|
Date.civil(2007,12,25) => 'Christmas Day',
|
|
|
|
Date.civil(2007,12,26) => 'Day of Goodwill'}.each do |date, name|
|
2010-04-28 15:13:56 +02:00
|
|
|
assert_equal name, (Holidays.on(date, :za, :informal)[0] || {})[:name]
|
2008-12-30 20:43:29 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|