Fix a user's atom feed route from a cell phone.
This commit is contained in:
parent
2229921ba9
commit
f8e53bfba5
2 changed files with 6 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ class UsersController < ApplicationController
|
||||||
render :xml => director.build(ostatus_builder), :content_type => 'application/atom+xml'
|
render :xml => director.build(ostatus_builder), :content_type => 'application/atom+xml'
|
||||||
end
|
end
|
||||||
|
|
||||||
format.html { redirect_to person_path(user.person.id) }
|
format.any { redirect_to person_path(user.person.id) }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect_to root_url, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
redirect_to root_url, :error => I18n.t('users.public.does_not_exist', :username => params[:username])
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,11 @@ describe UsersController do
|
||||||
get :public, :username => @user.username
|
get :public, :username => @user.username
|
||||||
response.should be_redirect
|
response.should be_redirect
|
||||||
end
|
end
|
||||||
|
it 'redirects to a profile page if mobile is requested' do
|
||||||
|
Diaspora::OstatusBuilder.should_not_receive(:new)
|
||||||
|
get :public, :username => @user.username, :format => :mobile
|
||||||
|
response.should be_redirect
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#update' do
|
describe '#update' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue