mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-01 21:21:02 -05:00
Whitespace fix, spec fix, and spec addition
This commit is contained in:
@@ -23,6 +23,6 @@
|
||||
Delete
|
||||
- if can?(:edit, @garden) && can?(:create, Photo)
|
||||
= link_to new_photo_path(type: "garden", id: @garden.id),
|
||||
class: 'btn btn-primary' do
|
||||
class: 'btn btn-primary' do
|
||||
%span.glyphicon.glyphicon-camera{ title: "Add Photo" }
|
||||
Add Photo
|
||||
|
||||
@@ -13,7 +13,7 @@ feature "new photo page" do
|
||||
|
||||
scenario "add photo" do
|
||||
visit planting_path(planting)
|
||||
click_link "Add photo"
|
||||
click_link('Add photo', match: :first)
|
||||
expect(page).to have_text planting.crop.name
|
||||
end
|
||||
end
|
||||
|
||||
@@ -50,6 +50,10 @@ describe "gardens/show" do
|
||||
rendered.should have_content "Plant something"
|
||||
end
|
||||
|
||||
it "shows an 'add photo' button" do
|
||||
rendered.should have_content "Add photo"
|
||||
end
|
||||
|
||||
it "links to the right crop in the planting link" do
|
||||
assert_select("a[href='#{new_planting_path}?garden_id=#{@garden.id}']")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user