fix 500 on posts show on mobile

This commit is contained in:
danielgrippi 2011-07-15 22:37:21 -07:00
parent 39da9302a1
commit 22fdf7f895
2 changed files with 7 additions and 3 deletions

View file

@ -20,7 +20,7 @@
%br %br
- if current_user.owns? @post - if current_user.owns? @post
= link_to t('delete'), @post, :confirm => t('are_you_sure'), :method => :delete = link_to t('delete'), post_path(@post), :confirm => t('are_you_sure'), :method => :delete
- else - else
= link_to t('hide'), post_visibility_path(:id => "42", :post_id => @post.id), :confirm => t('are_you_sure'), :method => :put, :remote => true = link_to t('hide'), post_visibility_path(:id => "42", :post_id => @post.id), :confirm => t('are_you_sure'), :method => :put, :remote => true

View file

@ -14,14 +14,18 @@ describe PostsController do
alice.add_to_streams(@message, [aspect]) alice.add_to_streams(@message, [aspect])
alice.dispatch_post @message, :to => aspect.id alice.dispatch_post @message, :to => aspect.id
end end
describe '#show' do describe '#show' do
it 'succeeds' do it 'succeeds' do
get :show, "id" => @message.id.to_s get :show, "id" => @message.id.to_s
response.should be_success response.should be_success
end end
it 'succeeds on mobile' do
get :show, "id" => @message.id.to_s, :format => :mobile
response.should be_success
end
it 'marks a corresponding notification as read' do it 'marks a corresponding notification as read' do
alice.comment("comment after me", :post => @message) alice.comment("comment after me", :post => @message)
bob.comment("here you go", :post => @message) bob.comment("here you go", :post => @message)