Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request Growstuff#723 from cesy/moretests
Browse files Browse the repository at this point in the history
More tests
  • Loading branch information
Skud committed May 20, 2015
2 parents add275e + 8990e80 commit a3b9c50
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/factories/crop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
factory :uppercasecrop do
name "Swiss chard"
end

factory :autoloaded_crop do
creator "cropbot"
end

#for testing crop request
factory :crop_request do
Expand Down
8 changes: 8 additions & 0 deletions spec/features/plantings/planting_a_crop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
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"
Expand Down

0 comments on commit a3b9c50

Please sign in to comment.