Merge pull request #723 from cesy/moretests

More tests
This commit is contained in:
Skud
2015-05-20 10:06:18 +10:00
2 changed files with 12 additions and 0 deletions

View File

@@ -54,6 +54,10 @@ FactoryGirl.define do
factory :uppercasecrop do
name "Swiss chard"
end
factory :autoloaded_crop do
creator "cropbot"
end
#for testing crop request
factory :crop_request do

View File

@@ -40,6 +40,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 => "mai"