From a5b120532a7c0b21459080d8b7e649ce349a2c1a Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sat, 3 Sep 2011 17:51:51 -0700 Subject: [PATCH] Use a jasmine fixture with just one post for the comment specs. --- spec/controllers/aspects_controller_spec.rb | 7 +++++++ spec/javascripts/widgets/comment-stream-spec.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index c82e8f58f..a833e737a 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -91,6 +91,13 @@ describe AspectsController do save_fixture(html_for("body"), "aspects_index_with_posts") end + it "generates a jasmine fixture with a post with comments", :fixture => true do + message = bob.post(:status_message, :text => "HALO WHIRLED", :to => @bob.aspects.where(:name => "generic").first.id) + 5.times { bob.comment("what", :post => message) } + get :index + save_fixture(html_for("body"), "aspects_index_post_with_comments") + end + it 'generates a jasmine fixture with a followed tag', :fixture => true do @tag = ActsAsTaggableOn::Tag.create!(:name => "partytimeexcellent") TagFollowing.create!(:tag => @tag, :user => alice) diff --git a/spec/javascripts/widgets/comment-stream-spec.js b/spec/javascripts/widgets/comment-stream-spec.js index 93da7acf5..3f369ff69 100644 --- a/spec/javascripts/widgets/comment-stream-spec.js +++ b/spec/javascripts/widgets/comment-stream-spec.js @@ -4,7 +4,7 @@ describe("Diaspora.Widgets.CommentStream", function() { beforeEach(function() { ajaxCommentResponse = spec.readFixture("ajax_comments_on_post"); - spec.loadFixture("aspects_index_with_posts"); + spec.loadFixture("aspects_index_post_with_comments"); jasmine.Clock.useMock(); jasmine.Ajax.useMock();