aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-01-05 17:30:52 +0000
committerLouise Crow <louise.crow@gmail.com>2015-01-05 17:30:52 +0000
commitee98fb2a78b21fafbb3b290b35e18286911c9aed (patch)
treebb4c83c0433689c1942bd4d19090d5cd699febd7
parent5201da89076bfb38aca1ab09792cc2e789d41850 (diff)
Fix assumption of current year as 2014 in holiday import specs
-rw-r--r--spec/models/holiday_import_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/holiday_import_spec.rb b/spec/models/holiday_import_spec.rb
index d0be6fb98..21061f63f 100644
--- a/spec/models/holiday_import_spec.rb
+++ b/spec/models/holiday_import_spec.rb
@@ -38,8 +38,8 @@ describe HolidayImport do
it 'defaults to importing holidays for the current year' do
holiday_import = HolidayImport.new
- holiday_import.start_year.should == 2014
- holiday_import.end_year.should == 2014
+ holiday_import.start_year.should == Time.now.year
+ holiday_import.end_year.should == Time.now.year
end
it 'allows the start and end year to be set' do
@@ -112,7 +112,9 @@ describe HolidayImport do
before do
@holiday_import = HolidayImport.new(:source => 'feed',
- :ical_feed_url => 'http://www.example.com')
+ :ical_feed_url => 'http://www.example.com',
+ :start_year => 2014,
+ :end_year => 2014)
end
it 'should populate holidays from the feed that are between the dates' do