diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/comments_controller_spec.rb | 5 | ||||
-rw-r--r-- | spec/controllers/posts_controller_spec.rb | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb index e7a38b330..ec0c155b6 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 d868c0e23..928d129a0 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) |