diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index efbcf2528..57d53db4c 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -45,13 +45,12 @@ =t('.born') = birthday_format(person.birthday) %li - - unless @photos.blank? + - if @photos.present? %h4 = t('_photos') .item_count = "#{@photos.count}" - - @thumbs = @photos.limit(3) - - for photo in @thumbs + - @photos.limit(3).each do |photo| = image_tag(photo.url(:thumb_small)) %br = link_to t('layouts.header.view_all'), person_photos_path(person) diff --git a/features/profile_photos.feature b/features/profile_photos.feature index 435cb704e..91a56c4ee 100644 --- a/features/profile_photos.feature +++ b/features/profile_photos.feature @@ -15,8 +15,8 @@ Feature: show photos And I press "Share" Scenario: see my own photos - And I am on "robert@grimm.grimm"'s page When I follow "View all" + And I am on "robert@grimm.grimm"'s page Then I should be on person_photos page Scenario: I cannot see photos of people who don't share with me