From 3d197725151aa4e4d0da7446ad7bf4463b7186ca Mon Sep 17 00:00:00 2001 From: Skud Date: Mon, 19 Aug 2013 17:59:40 +1000 Subject: [PATCH] Fixed some broken tests for displaying member location --- app/views/plantings/show.html.haml | 2 +- spec/views/plantings/show.html.haml_spec.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/plantings/show.html.haml b/app/views/plantings/show.html.haml index 14ab75fbd..a192a27d0 100644 --- a/app/views/plantings/show.html.haml +++ b/app/views/plantings/show.html.haml @@ -9,7 +9,7 @@ %b Where: =link_to "#{@planting.owner}'s", @planting.owner =link_to @planting.garden, @planting.garden - - if !@planting.owner.location.blank? + - if ! @planting.owner.location.blank? = "(#{@planting.owner.location})" %p %b Quantity: diff --git a/spec/views/plantings/show.html.haml_spec.rb b/spec/views/plantings/show.html.haml_spec.rb index 0f7d45d98..018e5074b 100644 --- a/spec/views/plantings/show.html.haml_spec.rb +++ b/spec/views/plantings/show.html.haml_spec.rb @@ -94,13 +94,13 @@ describe "plantings/show" do context "location set" do before(:each) do - @member.location = 'Greenwich, UK' - @member.save + @p.owner.location = 'Greenwich, UK' + @p.owner.save render end it "shows the member's location in parentheses" do - rendered.should contain "(#{@member.location})" + rendered.should contain "(#{@p.owner.location})" end end end