Made toggleComments jasmine test aware that there are more posts in the fixture
This commit is contained in:
parent
2a52face12
commit
395df041db
1 changed files with 2 additions and 2 deletions
|
|
@ -65,7 +65,7 @@ describe("Stream", function() {
|
||||||
|
|
||||||
describe("toggleComments", function() {
|
describe("toggleComments", function() {
|
||||||
it("toggles class hidden on the comments ul", 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");
|
expect(jQuery('ul.comments')).not.toHaveClass("hidden");
|
||||||
Stream.toggleComments.call(
|
Stream.toggleComments.call(
|
||||||
link, {preventDefault: function(){} }
|
link, {preventDefault: function(){} }
|
||||||
|
|
@ -75,7 +75,7 @@ describe("Stream", function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("changes the text on the show comments link", 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(
|
Diaspora.widgets.i18n.loadLocale(
|
||||||
{'comments' : {'show': 'comments.show pl'}}, 'en');
|
{'comments' : {'show': 'comments.show pl'}}, 'en');
|
||||||
expect(link.text()).toEqual("Hide all comments");
|
expect(link.text()).toEqual("Hide all comments");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue