Add tests for photo link in profile side bar

This commit is contained in:
carolina 2013-08-12 16:00:39 +02:00 committed by mokus
parent 8df8855ac0
commit fd05d30f20
2 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,27 @@
@javascript
Feature: show photos
Background:
Given following users exist:
| username | email |
| Bob Jones | bob@bob.bob |
| Alice Smith | alice@alice.alice |
| Robert Grimm | robert@grimm.grimm |
And I sign in as "robert@grimm.grimm"
Given I expand the publisher
And I have turned off jQuery effects
And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
And I press "Share"
Scenario: see my own photos
And I am on "robert@grimm.grimm"'s page
When I follow "View all"
Then I should be on person_photos page
Scenario: I cannot see photos of people who don't share with me
When I sign in as "alice@alice.alice"
And I am on "robert@grimm.grimm"'s page
Then I should not see "photos" within "div#profile"

View file

@ -1,6 +1,8 @@
module NavigationHelpers
def path_to(page_name)
case page_name
when /^person_photos page$/
person_photos_path(@me.person)
when /^the home(?: )?page$/
stream_path
when /^step (\d)$/