Commit e1658f8d authored by Jonne Haß's avatar Jonne Haß

switch PhotosController#index over to guid, fix #2729

parent 9c67cd7e
......@@ -11,7 +11,7 @@ class PhotosController < ApplicationController
def index
@post_type = :photos
@person = Person.find_by_id(params[:person_id])
@person = Person.find_by_guid(params[:person_id])
if @person
@profile = @person.profile
......@@ -64,19 +64,19 @@ describe PhotosController do
describe '#index' do
it "succeeds without any available pictures" do
get :index, :person_id => Factory(:person).id.to_s
get :index, :person_id => Factory(:person).guid.to_s
response.should be_success
it "displays the logged in user's pictures" do
get :index, :person_id =>
get :index, :person_id => alice.person.guid.to_s
assigns[:person].should == alice.person
assigns[:posts].should == [@alices_photo]
it "displays another person's pictures" do
get :index, :person_id =>
get :index, :person_id => bob.person.guid.to_s
assigns[:person].should == bob.person
assigns[:posts].should == [@bobs_photo]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment