From 125be418687f7ef1040761c03469cd0feb089ae7 Mon Sep 17 00:00:00 2001 From: Steven Hancock Date: Thu, 29 Mar 2012 20:42:45 -0700 Subject: [PATCH] Test for mobile UI single post view Verify that the correct layout is rendered (rather than no layout at all) in the mobile UI single post view. This is a test I forgot to write at 5am when I was so excited about having the mobile UI working on my Blackberry again (bad me!), so here it is before it slips my mind. :grin: This tests the change made to posts_controller in 6abe718227bcc858 --- spec/controllers/posts_controller_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb index 9c97dd1c4..8ab8d8493 100644 --- a/spec/controllers/posts_controller_spec.rb +++ b/spec/controllers/posts_controller_spec.rb @@ -30,6 +30,11 @@ describe PostsController do response.should be_success end + it 'renders the application layout on mobile' do + get :show, :id => @message.id, :format => :mobile + response.should render_template('layouts/application') + end + it 'succeeds on mobile with a reshare' do get :show, "id" => Factory(:reshare, :author => alice.person).id, :format => :mobile response.should be_success