generate jasmine fixture with posts

This commit is contained in:
Dan Hansen 2011-03-10 19:12:16 -06:00
parent c9545920f8
commit 10345b14a8
2 changed files with 8 additions and 2 deletions

View file

@ -67,6 +67,11 @@ describe AspectsController do
get :index, :prefill => "reshare things"
save_fixture(html_for("body"), "aspects_index_services")
end
it 'generates a jasmine fixture with posts' do
@user.post(:status_message, :message => "hello", :to => @aspect1.id)
get :index
save_fixture(html_for("body"), "aspects_index_with_posts")
end
context 'filtering' do
before do
@posts = []

View file

@ -46,9 +46,10 @@ describe("Diaspora", function() {
});
});
it("has to have a certain DOM structure", function() {
spec.loadFixture("aspects_index");
spec.loadFixture("aspects_index_with_posts");
var $post = $("#main_stream").children(".stream_element:first"),
$contentParagraph = $post.children(".content").children(".from").children("p"),
$infoDiv = $contentParagraph.closest(".from").siblings(".info");