Call collapseText on stream initialize

This commit is contained in:
Raphael Sofaer 2011-08-03 12:47:48 -07:00
parent 0b1ef41838
commit 168ccc11b0
2 changed files with 9 additions and 0 deletions

View file

@ -19,6 +19,7 @@ var Stream = {
//Stream.setUpImageLinks();
Diaspora.widgets.subscribe("stream/scrolled", Stream.collapseText);
Stream.collapseText('eventID', Stream.selector);
},
collapseText: function(){
elements = $(Array.prototype.slice.call(arguments,1));

View file

@ -40,6 +40,14 @@ describe("Stream", function() {
});
});
describe("initialize", function() {
it("calls collapseText",function(){
spyOn(Stream, "collapseText");
Stream.initialize();
expect(Stream.collapseText).toHaveBeenCalled();
})
});
describe("toggleComments", function() {
it("toggles class hidden on the comments ul", function () {
link = $("a.toggle_post_comments");