From 9d0764dadb5b55e399ca1dbbfbdbcd9b738c3de3 Mon Sep 17 00:00:00 2001
From: Maxwell Salzberg <maxwell@joindiaspora.com>
Date: Fri, 29 Jul 2011 10:14:59 -0700
Subject: [PATCH] two failing tests for the mobile site. SOMEBODY FIX THEM

---
 spec/controllers/comments_controller_spec.rb | 5 +++++
 spec/controllers/posts_controller_spec.rb    | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb
index e7a38b3309..ec0c155b6a 100644
--- a/spec/controllers/comments_controller_spec.rb
+++ b/spec/controllers/comments_controller_spec.rb
@@ -123,6 +123,11 @@ describe CommentsController do
       @message = bob.post(:status_message, :text => "hey", :to => bob.aspects.first.id)
       @comments = [alice, bob, eve].map{ |u| u.comment("hey", :post => @message) }
     end
+    it 'works for mobile' do
+      get :index, :post_id => @message.id, :format => 'mobile'
+      response.should be_success
+    end
+
     it 'returns all the comments for a post' do
       get :index, :post_id => @message.id, :format => 'js'
       assigns[:comments].should == @comments
diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb
index d868c0e23c..928d129a08 100644
--- a/spec/controllers/posts_controller_spec.rb
+++ b/spec/controllers/posts_controller_spec.rb
@@ -26,6 +26,11 @@ describe PostsController do
       response.should be_success
     end
 
+    it 'succeeds on mobile with a reshare' do
+      get :show, "id" => Factory(:reshare, :author => alice.person), :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)
-- 
GitLab