remote "Note" about random selection of crops

This commit is contained in:
Skud
2013-01-17 15:16:38 +11:00
parent 501cad39f9
commit a0b74562f5
4 changed files with 8 additions and 6 deletions

View File

@@ -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|

View File

@@ -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|

View File

@@ -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'

View File

@@ -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