diff --git a/spec/features/harvests/harvesting_a_crop_spec.rb b/spec/features/harvests/harvesting_a_crop_spec.rb index 0feb29618..caffb237d 100644 --- a/spec/features/harvests/harvesting_a_crop_spec.rb +++ b/spec/features/harvests/harvesting_a_crop_spec.rb @@ -6,7 +6,7 @@ feature "Harvesting a crop", :js => true do background do login_as(member) - visit '/harvests/new' + visit new_harvest_path end it_behaves_like "crop suggest", "harvest", "crop" @@ -26,7 +26,7 @@ feature "Harvesting a crop", :js => true do end scenario "Harvesting from crop page" do - visit "/crops/maize" + visit crop_path(maize) click_link "Harvest this" within "form#new_harvest" do expect(page).to have_selector "input[value='maize']" diff --git a/spec/features/locale_spec.rb b/spec/features/locale_spec.rb index 9a787f6cc..b5893858d 100644 --- a/spec/features/locale_spec.rb +++ b/spec/features/locale_spec.rb @@ -7,10 +7,10 @@ feature "Changing locales" do end scenario "Locale can be set with a query param" do - visit "/" + visit root_path expect(page).to have_content("a community of food gardeners.") - visit "/?locale=ja" - expect(page).to have_content("はガーデナーのコミュニティです。") + visit root_path(:locale => 'ja') + expect(page).to have_content("はガーデナーのコミュニティです。") end -end \ No newline at end of file +end diff --git a/spec/features/plantings/planting_a_crop_spec.rb b/spec/features/plantings/planting_a_crop_spec.rb index be5fc1142..ab120fa48 100644 --- a/spec/features/plantings/planting_a_crop_spec.rb +++ b/spec/features/plantings/planting_a_crop_spec.rb @@ -8,7 +8,7 @@ feature "Planting a crop", :js => true do background do login_as(member) - visit "/plantings/new" + visit new_planting_path end it_behaves_like "crop suggest", "planting", "crop" @@ -29,7 +29,7 @@ feature "Planting a crop", :js => true do end scenario "Planting from crop page" do - visit "/crops/maize" + visit crop_path(maize) click_link "Plant this" within "form#new_planting" do expect(page).to have_selector "input[value='maize']" diff --git a/spec/features/seeds/adding_seeds_spec.rb b/spec/features/seeds/adding_seeds_spec.rb index 7df57b95a..ca79c5b8c 100644 --- a/spec/features/seeds/adding_seeds_spec.rb +++ b/spec/features/seeds/adding_seeds_spec.rb @@ -6,7 +6,7 @@ feature "Harvesting a crop", :js => true do background do login_as(member) - visit '/seeds/new' + visit new_seed_path end it_behaves_like "crop suggest", "seed", "crop" @@ -26,7 +26,7 @@ feature "Harvesting a crop", :js => true do end scenario "Adding a seed from crop page" do - visit "/crops/maize" + visit crop_path(maize) click_link "Add seeds to stash" within "form#new_seed" do expect(page).to have_selector "input[value='maize']"