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
end
it "displays the logged in user's pictures" do
get :index, :person_id => alice.person.id.to_s
get :index, :person_id => alice.person.guid.to_s
assigns[:person].should == alice.person
assigns[:posts].should == [@alices_photo]
end
it "displays another person's pictures" do
get :index, :person_id => bob.person.id.to_s
get :index, :person_id => bob.person.guid.to_s
assigns[:person].should == bob.person
assigns[:posts].should == [@bobs_photo]
end
......
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