use rails paths when visiting pages

This commit is contained in:
Skud committed 2014-10-18 16:01:00 +01:00
1 parent 9ededef54d
commit 29a5fe07c2
4 files changed
+10 -10

No files matched your search

@@ -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']"
+4 -4
View File
@@ -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
end
@@ -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']"
+2 -2
View File
@@ -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']"