Finish coverage of editing

This commit is contained in:
Andrew Tomaka 2013-08-11 13:35:08 -04:00
parent 62f3b10184
commit 9f260a691c
2 changed files with 12 additions and 0 deletions

View file

@ -46,6 +46,16 @@ describe "Workouts" do
page.should have_content 'Workout updated'
end
it "should not edit with bad data" do
visit workouts_path
find("#workout_#{@workout.id}").click_link 'Edit'
fill_in 'Date', :with => '2013-13-13'
click_button 'Update Workout'
page.should have_content "Date is not a valid date"
end
end
describe "GET /workouts/new" do