From a0b74562f58a3cfcea3ef2671e05f37bec58a7ea Mon Sep 17 00:00:00 2001 From: Skud Date: Thu, 17 Jan 2013 15:16:38 +1100 Subject: [PATCH] remote "Note" about random selection of crops --- app/views/gardens/show.html.haml | 3 --- app/views/members/show.html.haml | 3 --- spec/views/gardens/show.html.haml_spec.rb | 4 ++++ spec/views/members/show.html.haml_spec.rb | 4 ++++ 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/views/gardens/show.html.haml b/app/views/gardens/show.html.haml index 174e1e98a..083ac1622 100644 --- a/app/views/gardens/show.html.haml +++ b/app/views/gardens/show.html.haml @@ -28,9 +28,6 @@ .tab-pane.active#tab1 - if current_member == @garden.owner %p= link_to "Plant something", new_planting_path(:garden_id => @garden.id), :class => 'btn btn-large btn-primary' - .alert - %button.close{:type => 'button', 'data-dismiss' => 'alert'} × - Note: these are a random selection, and don't represent actual plantings %ul.thumbnails - @garden.plantings.each do |p| diff --git a/app/views/members/show.html.haml b/app/views/members/show.html.haml index f86527531..dcb9748ba 100644 --- a/app/views/members/show.html.haml +++ b/app/views/members/show.html.haml @@ -25,9 +25,6 @@ %div{:class => ['tab-pane', first_garden ? 'active' : ''], :id => "garden#{g.id}"} - first_garden = false - .alert - %button.close{:type => 'button', 'data-dismiss' => 'alert'} × - Note: these are a random selection, and don't represent actual plantings %ul.thumbnails - g.featured_plantings.each do |p| diff --git a/spec/views/gardens/show.html.haml_spec.rb b/spec/views/gardens/show.html.haml_spec.rb index e74127212..924b7d9f6 100644 --- a/spec/views/gardens/show.html.haml_spec.rb +++ b/spec/views/gardens/show.html.haml_spec.rb @@ -13,6 +13,10 @@ describe "gardens/show" do rendered.should contain @planting.crop.system_name end + it "doesn't show the note about random plantings" do + rendered.should_not contain "Note: these are a random selection" + end + context 'logged out' do it 'should not show the edit button' do rendered.should_not contain 'Edit' diff --git a/spec/views/members/show.html.haml_spec.rb b/spec/views/members/show.html.haml_spec.rb index 2ce9de9bb..d360303c7 100644 --- a/spec/views/members/show.html.haml_spec.rb +++ b/spec/views/members/show.html.haml_spec.rb @@ -28,6 +28,10 @@ describe "members/show" do rendered.should contain @planting.crop.system_name end + it "doesn't show the note about random plantings" do + rendered.should_not contain "Note: these are a random selection" + end + context "signed in member" do before(:each) do sign_in @member