Move some action button specs to feature specs

because it's in a buttonbar, not the view now
This commit is contained in:
Brenda Wallace
2019-01-23 14:33:48 +13:00
parent a926b37ad9
commit e5bb6fa154
2 changed files with 5 additions and 12 deletions

View File

@@ -54,6 +54,11 @@ feature "Gardens" do
end
describe '#show' do
before { visit garden_path(garden) }
it { is_expected.to have_link 'Edit' }
it { is_expected.to have_link 'Delete' }
it { is_expected.to have_content "Plant something here" }
it { is_expected.to have_content "Add photo" }
end
end

View File

@@ -42,18 +42,6 @@ describe "gardens/show" do
render
end
it 'should have an edit button' do
rendered.should have_link 'Edit'
end
it "shows a 'plant something' button" 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