Fix a jasmine test in CommentToggler

This commit is contained in:
Andrej Kacian 2011-08-22 20:05:18 +02:00
parent c0f45acfe8
commit 9fd4432e5a

View file

@ -21,7 +21,7 @@ describe("Diaspora.Widgets.CommentToggler", function() {
}); });
it("changes the text on the show comments link", function() { it("changes the text on the show comments link", function() {
var link = $("a.toggle_post_comments"); var link = $("a.toggle_post_comments:first");
Diaspora.I18n.loadLocale({'comments' : {'show': 'comments.show pl'}}, 'en'); Diaspora.I18n.loadLocale({'comments' : {'show': 'comments.show pl'}}, 'en');
expect(link.text()).toEqual("Hide all comments"); expect(link.text()).toEqual("Hide all comments");
commentToggler.hideComments($.Event()); commentToggler.hideComments($.Event());
@ -29,4 +29,4 @@ describe("Diaspora.Widgets.CommentToggler", function() {
expect(link.text()).toEqual("comments.show pl"); expect(link.text()).toEqual("comments.show pl");
}); });
}); });
}); });