diff --git a/spec/controllers/aspects_controller_spec.rb b/spec/controllers/aspects_controller_spec.rb index c1bd235a4..225f5cd44 100644 --- a/spec/controllers/aspects_controller_spec.rb +++ b/spec/controllers/aspects_controller_spec.rb @@ -96,6 +96,14 @@ describe AspectsController do save_fixture(html_for("body"), "aspects_index_with_posts") end + it 'generates a jasmine fixture with only posts', :fixture => true do + 2.times { bob.post(:status_message, :text => "Is anyone out there?", :to => @bob.aspects.where(:name => "generic").first.id) } + + get :index, :only_posts => true + + save_fixture(response.body, "aspects_index_only_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) } diff --git a/spec/javascripts/widgets/stream-element-spec.js b/spec/javascripts/widgets/stream-element-spec.js index 9146e06b6..bcd859991 100644 --- a/spec/javascripts/widgets/stream-element-spec.js +++ b/spec/javascripts/widgets/stream-element-spec.js @@ -8,8 +8,8 @@ describe("Diaspora.Widgets.StreamElement", function() { beforeEach(function() { jasmine.Clock.useMock(); - spec.loadFixture("aspects_index_with_posts"); - streamElement = Diaspora.BaseWidget.instantiate("StreamElement", $(".stream_element:has(a.stream_element_delete.vis_hide)")); + spec.loadFixture("aspects_index_only_posts"); + streamElement = Diaspora.BaseWidget.instantiate("StreamElement", $(".stream_element").first()); }); describe("hidePost", function() {