Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianEdwards committed May 6, 2015
1 parent 99f5f7d commit c2f26bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions data/nz.yaml
Expand Up @@ -119,6 +119,14 @@ tests: |
Date.civil(2007,12,26) => 'Boxing Day'}.each do |date, name|
assert_equal name, (Holidays.on(date, :nz, :informal)[0] || {})[:name]
end
assert_equal 'ANZAC Day', Date.civil(2015, 4, 25).holidays(:nz)[0][:name]
assert_equal 'ANZAC Day', Date.civil(2015, 4, 27).holidays(:nz, :observed)[0][:name]
assert_equal 'ANZAC Day', Date.civil(2016, 4, 25).holidays(:nz)[0][:name]
assert_equal 'ANZAC Day', Date.civil(2016, 4, 25).holidays(:nz, :observed)[0][:name]
assert_equal 'Waitangi Day', Date.civil(2015, 2, 6).holidays(:nz)[0][:name]
assert_equal 'Waitangi Day', Date.civil(2015, 2, 6).holidays(:nz, :observed)[0][:name]
assert_equal 'Waitangi Day', Date.civil(2016, 2, 6).holidays(:nz)[0][:name]
assert_equal 'Waitangi Day', Date.civil(2016, 2, 8).holidays(:nz, :observed)[0][:name]
methods:
closest_monday: |
def self.closest_monday(date)
Expand Down

0 comments on commit c2f26bf

Please sign in to comment.