holidays/test/defs/test_defs_no.rb

29 lines
976 B
Ruby
Raw Normal View History

2010-03-04 09:43:40 +01:00
require File.dirname(__FILE__) + '/../test_helper'
# This file is generated by the Ruby Holiday gem.
#
# Definitions loaded: data/no.yaml
class NoDefinitionTests < Test::Unit::TestCase # :nodoc:
def test_no
{Date.civil(2010,1,1) => 'Nyttårsdag',
Date.civil(2010,5,1) => '1. mai',
Date.civil(2010,5,17) => '17. mai',
Date.civil(2010,12,24) => 'Julaften',
Date.civil(2010,12,25) => '1. juledag',
Date.civil(2010,12,26) => '2. juledag',
Date.civil(2010,12,31) => 'Nyttårsaften',
Date.civil(2010,2,14) => 'Fastelavn',
Date.civil(2010,3,28) => 'Palmesøndag',
Date.civil(2010,4,1) => 'Skjærtorsdag',
Date.civil(2010,4,2) => 'Langfredag',
Date.civil(2010,4,4) => '1. påskedag',
Date.civil(2010,4,5) => '2. påskedag',
Date.civil(2010,5,13) => 'Kristi Himmelfartsdag',
Date.civil(2010,5,23) => '1. pinsedag',
Date.civil(2010,5,24) => '2. pinsedag'}.each do |date, name|
2010-04-28 15:13:56 +02:00
assert_equal name, (Holidays.on(date, :no, :informal)[0] || {})[:name]
2010-03-04 09:43:40 +01:00
end
end
end