From e5bb6fa15404687f0117afab3e69d212fbcd2de5 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 23 Jan 2019 14:33:48 +1300 Subject: [PATCH] Move some action button specs to feature specs because it's in a buttonbar, not the view now --- spec/features/gardens/actions_spec.rb | 5 +++++ spec/views/gardens/show.html.haml_spec.rb | 12 ------------ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/spec/features/gardens/actions_spec.rb b/spec/features/gardens/actions_spec.rb index 0f4545714..18a339e09 100644 --- a/spec/features/gardens/actions_spec.rb +++ b/spec/features/gardens/actions_spec.rb @@ -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 diff --git a/spec/views/gardens/show.html.haml_spec.rb b/spec/views/gardens/show.html.haml_spec.rb index 5594c6755..0a3f813e8 100644 --- a/spec/views/gardens/show.html.haml_spec.rb +++ b/spec/views/gardens/show.html.haml_spec.rb @@ -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