use the stream element partials for testing the StreamElement widget instead of Aspects#index
This commit is contained in:
parent
3296477531
commit
3cfa0c4602
2 changed files with 10 additions and 2 deletions
|
|
@ -96,6 +96,14 @@ describe AspectsController do
|
||||||
save_fixture(html_for("body"), "aspects_index_with_posts")
|
save_fixture(html_for("body"), "aspects_index_with_posts")
|
||||||
end
|
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
|
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)
|
message = bob.post(:status_message, :text => "HALO WHIRLED", :to => @bob.aspects.where(:name => "generic").first.id)
|
||||||
5.times { bob.comment("what", :post => message) }
|
5.times { bob.comment("what", :post => message) }
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ describe("Diaspora.Widgets.StreamElement", function() {
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
jasmine.Clock.useMock();
|
jasmine.Clock.useMock();
|
||||||
spec.loadFixture("aspects_index_with_posts");
|
spec.loadFixture("aspects_index_only_posts");
|
||||||
streamElement = Diaspora.BaseWidget.instantiate("StreamElement", $(".stream_element:has(a.stream_element_delete.vis_hide)"));
|
streamElement = Diaspora.BaseWidget.instantiate("StreamElement", $(".stream_element").first());
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("hidePost", function() {
|
describe("hidePost", function() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue