diff options
author | francis <francis> | 2009-09-17 21:30:15 +0000 |
---|---|---|
committer | francis <francis> | 2009-09-17 21:30:15 +0000 |
commit | 70a28840425058520e5b78dab5580abca076a69b (patch) | |
tree | bc8f345cc2593e5dee1a3016c41510c718ad85d8 /spec/models | |
parent | 333c49d782cf07dde3c200a5e55de118b8c08f8c (diff) |
Count weekends like our lawyer says too.
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/holiday_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/models/holiday_spec.rb b/spec/models/holiday_spec.rb index 6179bb434..ebfdeba4b 100644 --- a/spec/models/holiday_spec.rb +++ b/spec/models/holiday_spec.rb @@ -27,12 +27,15 @@ describe Holiday, " when calculating due date" do due_date('2009-03-13').should == '2009-04-15' end + # Delivery at the weekend ends up the same due day as if it had arrived on + # the Friday before. This is because the next working day (Monday) counts + # as day 1. + # See http://www.whatdotheyknow.com/help/about#days it "handles Saturday start" do - due_date('2009-03-14').should == '2009-04-16' + due_date('2009-03-14').should == '2009-04-15' end - it "handles Sunday start" do - due_date('2009-03-15').should == '2009-04-16' + due_date('2009-03-15').should == '2009-04-15' end it "handles Monday start" do |