diff --git a/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee b/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee index c2dc5f78dd..d88f3367dc 100644 --- a/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/discussion_thread_list_view_spec.coffee @@ -224,6 +224,13 @@ describe "DiscussionThreadListView", -> checkThreadsOrdering(view, sort_order, type) expect(view.$el.find(".forum-nav-thread-comments-count:visible").length).toEqual(if type == "votes" then 0 else 4) expect(view.$el.find(".forum-nav-thread-votes-count:visible").length).toEqual(if type == "votes" then 4 else 0) + if type == "votes" + expect( + _.map( + view.$el.find(".forum-nav-thread-votes-count"), + (element) -> $(element).text().trim() + ) + ).toEqual(["+25 votes", "+20 votes", "+42 votes", "+12 votes"]) it "with sort preference date", -> checkRender(@threads, "date", ["Thread1", "Thread4", "Thread2", "Thread3"]) diff --git a/common/static/common/templates/discussion/thread-list-item.underscore b/common/static/common/templates/discussion/thread-list-item.underscore index 335085fbc3..8e271cd1fd 100644 --- a/common/static/common/templates/discussion/thread-list-item.underscore +++ b/common/static/common/templates/discussion/thread-list-item.underscore @@ -64,7 +64,7 @@ ); %> - +<%- interpolate(fmt, { + +<%= interpolate(fmt, { votes_count: votes['up_count'], span_start: '', span_end: ''