Modify photos unless condition and loop through thumbnails and test
This commit is contained in:
parent
fd05d30f20
commit
f3817b996e
2 changed files with 3 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue