From 8990e803a0fa466ada23b8f133331ea73aa84f7e Mon Sep 17 00:00:00 2001 From: Cesy Avon Date: Thu, 26 Feb 2015 17:28:26 +0000 Subject: [PATCH] Increasing coverage of plantings controller --- spec/features/plantings/planting_a_crop_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index 16b47973f..81576cb0b 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -39,6 +39,14 @@ feature "Planting a crop", :js => true do expect(page).to have_content "Planting was successfully created" expect(page).to have_content "maize" end + + scenario "Editing a planting to add details" do + visit planting_path(planting) + click_link "Edit" + fill_in "Tell us more about it", :with => "Some extra notes" + click_button "Save" + expect(page).to have_content "Planting was successfully updated" + end scenario "Marking a planting as finished" do fill_autocomplete "crop", :with => "m"