diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 16:06:26 +1000 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2012-09-24 16:06:26 +1000 |
commit | 00e9b2ed77a55f90e12b0cc278c5723d9bc7dac0 (patch) | |
tree | d8cac6f1029cba1af94030b802366c3fbf6591f5 /spec/models | |
parent | 42998406cd909332382d80af3c7c4a9d58ffbe23 (diff) |
Handle times passed to Holiday.due_date_from_calendar_days
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/holiday_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/holiday_spec.rb b/spec/models/holiday_spec.rb index 45c301d67..30beacb50 100644 --- a/spec/models/holiday_spec.rb +++ b/spec/models/holiday_spec.rb @@ -77,6 +77,10 @@ describe Holiday, " when calculating due date" do it "handles the due date falling on a Holiday" do Holiday.due_date_from_calendar_days(Date.new(2008, 12, 5), 20).should == Date.new(2008, 12, 29) end + + it "handles Time objects" do + Holiday.due_date_from_calendar_days(Time.utc(2009, 03, 17, 12, 0, 0), 20).should == Date.new(2009, 4, 6) + end end end |