From 395df041dbf04d30073de77400c62cf724b5d2da Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Thu, 18 Aug 2011 23:35:39 +0200 Subject: [PATCH] Made toggleComments jasmine test aware that there are more posts in the fixture --- spec/javascripts/stream-spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/javascripts/stream-spec.js b/spec/javascripts/stream-spec.js index 55b9c98a9..950f8987f 100644 --- a/spec/javascripts/stream-spec.js +++ b/spec/javascripts/stream-spec.js @@ -65,7 +65,7 @@ describe("Stream", function() { describe("toggleComments", function() { it("toggles class hidden on the comments ul", function () { - link = $("a.toggle_post_comments"); + link = $("a.toggle_post_comments").first(); expect(jQuery('ul.comments')).not.toHaveClass("hidden"); Stream.toggleComments.call( link, {preventDefault: function(){} } @@ -75,7 +75,7 @@ describe("Stream", function() { }); it("changes the text on the show comments link", function() { - link = $("a.toggle_post_comments"); + link = $("a.toggle_post_comments").first(); Diaspora.widgets.i18n.loadLocale( {'comments' : {'show': 'comments.show pl'}}, 'en'); expect(link.text()).toEqual("Hide all comments");