diff --git a/app/views/posts/show.mobile.haml b/app/views/posts/show.mobile.haml index b83c8004c..b2dcd6b2f 100644 --- a/app/views/posts/show.mobile.haml +++ b/app/views/posts/show.mobile.haml @@ -20,7 +20,7 @@ %br - 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 = link_to t('hide'), post_visibility_path(:id => "42", :post_id => @post.id), :confirm => t('are_you_sure'), :method => :put, :remote => true diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb index 25c12b90a..d868c0e23 100644 --- a/spec/controllers/posts_controller_spec.rb +++ b/spec/controllers/posts_controller_spec.rb @@ -14,14 +14,18 @@ describe PostsController do alice.add_to_streams(@message, [aspect]) alice.dispatch_post @message, :to => aspect.id end + describe '#show' do - - it 'succeeds' do get :show, "id" => @message.id.to_s response.should be_success 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 alice.comment("comment after me", :post => @message) bob.comment("here you go", :post => @message)