Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Hansen <mokker1234@gmail.com>2011-08-31 09:00:40 +0400
committerDan Hansen <mokker1234@gmail.com>2011-08-31 09:00:49 +0400
commit2b31999f288f62b250d9658224b7c5d9f836b795 (patch)
tree0757fd1fccda73e9e3bd4ab3686d40c59b2938e4 /spec/controllers/comments_controller_spec.rb
parenta5cbf59c6a1c86e21960dced9248b48edf2b453c (diff)
pull in jasmine-ajax, start testing our ajax callbacks with meaningful responses
Diffstat (limited to 'spec/controllers/comments_controller_spec.rb')
-rw-r--r--spec/controllers/comments_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb
index 126aaf963..cf7a67189 100644
--- a/spec/controllers/comments_controller_spec.rb
+++ b/spec/controllers/comments_controller_spec.rb
@@ -128,6 +128,14 @@ describe CommentsController do
@message = bob.post(:status_message, :text => "hey", :to => aspect_to_post.id)
@comments = [alice, bob, eve].map{ |u| u.comment("hey", :post => @message) }
end
+
+ it 'generates a jasmine fixture', :fixture => true do
+ 2.times { alice.comment("hey", :post => @message) }
+ get :index, :post_id => @message.id
+
+ save_fixture(response.body, "ajax_comments_on_post")
+ end
+
it 'works for mobile' do
get :index, :post_id => @message.id, :format => 'mobile'
response.should be_success