aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/admin_holidays_controller_spec.rb22
-rw-r--r--spec/models/holiday_spec.rb2
2 files changed, 22 insertions, 2 deletions
diff --git a/spec/controllers/admin_holidays_controller_spec.rb b/spec/controllers/admin_holidays_controller_spec.rb
index b3b813790..61833b425 100644
--- a/spec/controllers/admin_holidays_controller_spec.rb
+++ b/spec/controllers/admin_holidays_controller_spec.rb
@@ -29,4 +29,24 @@ describe AdminHolidaysController do
end
end
-end
+
+ describe :edit do
+
+ before do
+ @holiday = FactoryGirl.create(:holiday)
+ end
+
+ it 'renders the edit template' do
+ get :edit, :id => @holiday.id
+ expect(response).to render_template('edit')
+ end
+
+ it 'gets the holiday in the id param' do
+ get :edit, :id => @holiday.id
+ assigns[:holiday].should == @holiday
+ end
+
+
+ end
+
+ end
diff --git a/spec/models/holiday_spec.rb b/spec/models/holiday_spec.rb
index 8c19f4aac..2f8eeabd9 100644
--- a/spec/models/holiday_spec.rb
+++ b/spec/models/holiday_spec.rb
@@ -16,7 +16,7 @@ describe Holiday do
it 'should require a day' do
holiday = Holiday.new
holiday.valid?.should be_false
- holiday.errors[:day].should == "can't be blank"
+ holiday.errors[:day].should == ["can't be blank"]
end
end