Merge pull request #4255 from netom/4194-mobile-photo-view
4194 mobile photo view
This commit is contained in:
commit
521aaf894b
3 changed files with 16 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
## Bug fixes
|
||||
* Don't focus comment form on 'show n more comments' [#4265](https://github.com/diaspora/diaspora/issues/4265)
|
||||
* Do not render mobile photo view for none-existing photos [#4194](https://github.com/diaspora/diaspora/issues/4194)
|
||||
|
||||
## Features
|
||||
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,10 @@ class PhotosController < ApplicationController
|
|||
|
||||
respond_to :html, :json
|
||||
|
||||
def show
|
||||
@photo = Photo.find(params[:id])
|
||||
end
|
||||
|
||||
def index
|
||||
@post_type = :photos
|
||||
@person = Person.find_by_guid(params[:person_id])
|
||||
|
|
|
|||
|
|
@ -163,4 +163,15 @@ describe PhotosController do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#show" do
|
||||
it 'should return 404 for nonexistent stuff on mobile devices' do
|
||||
expect{get :show, :id => 772831, :format => 'mobile'}.to raise_error ActiveRecord::RecordNotFound
|
||||
end
|
||||
|
||||
it 'should return 200 for existing stuff on mobile devices' do
|
||||
get :show, :id => @alices_photo.id, :format => 'mobile'
|
||||
response.should be_success
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue