diff --git a/test/javascripts/controllers/notifications_controller_test.js b/test/javascripts/controllers/notifications_controller_test.js index 8400dfe9ff..16951f72fa 100644 --- a/test/javascripts/controllers/notifications_controller_test.js +++ b/test/javascripts/controllers/notifications_controller_test.js @@ -72,10 +72,10 @@ test("displays a list of notifications and a 'more' link when there are notifica equal(count(items), 3, "number of list items is correct"); equal(items.eq(0).attr("class"), "", "first (unread) item has proper class"); - equal(items.eq(0).text(), "scope_1 username_1 link_1", "first item has correct content"); + equal(items.eq(0).text().trim(), "scope_1 username_1 link_1", "first item has correct content"); equal(items.eq(1).attr("class"), "read", "second (read) item has proper class"); - equal(items.eq(1).text(), "scope_2 username_2 link_2", "second item has correct content"); + equal(items.eq(1).text().trim(), "scope_2 username_2 link_2", "second item has correct content"); var moreLink = items.eq(2).find("> a"); equal(moreLink.attr("href"), Discourse.User.current().get("path"), "'more' link points to a correct URL"); diff --git a/test/javascripts/integration/header_test.js b/test/javascripts/integration/header_test.js index 5cb8729d03..8978435912 100644 --- a/test/javascripts/integration/header_test.js +++ b/test/javascripts/integration/header_test.js @@ -80,7 +80,7 @@ test("notifications dropdown", function() { ok(exists($items), "is lazily populated after user opens it"); ok($items.first().hasClass("read"), "correctly binds items' 'read' class"); - equal($items.first().find('span').html(), 'notifications.replied velesin some title', "correctly generates items' content"); + equal($items.first().find('span').html().trim(), 'notifications.replied velesin some title', "correctly generates items' content"); }); });