Skip to content
Extraits de code Groupes Projets
Valider e1658f8d rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

switch PhotosController#index over to guid, fix #2729

parent 9c67cd7e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter