Use a jasmine fixture with just one post for the comment specs.

This commit is contained in:
Sarah Mei 2011-09-03 17:51:51 -07:00
parent d46bf5f748
commit a5b120532a
2 changed files with 8 additions and 1 deletions

View file

@ -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)

View file

@ -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();