Commit 3767a34c by Greg Price Committed by Zia Fazal

Use some real templates in forum list view tests

Unfortunately, one template (thread-list-template, defined in
_thread_list_template.html) still relies on complex Mako processing, so
that is still being mocked in the tests.
parent b6f00aca
...@@ -133,7 +133,7 @@ describe "DiscussionThreadListView", -> ...@@ -133,7 +133,7 @@ describe "DiscussionThreadListView", ->
] ]
spyOn($, "ajax") spyOn($, "ajax")
@discussion = new Discussion([]) @discussion = new Discussion([])
@view = new DiscussionThreadListView( @view = new DiscussionThreadListView(
collection: @discussion, collection: @discussion,
...@@ -154,7 +154,7 @@ describe "DiscussionThreadListView", -> ...@@ -154,7 +154,7 @@ describe "DiscussionThreadListView", ->
renderSingleThreadWithProps = (props) -> renderSingleThreadWithProps = (props) ->
makeView(new Discussion([new Thread(DiscussionViewSpecHelper.makeThreadWithProps(props))])).render() makeView(new Discussion([new Thread(DiscussionViewSpecHelper.makeThreadWithProps(props))])).render()
makeView = (discussion) -> makeView = (discussion) ->
return new DiscussionThreadListView( return new DiscussionThreadListView(
el: $("#fixture-element"), el: $("#fixture-element"),
collection: discussion, collection: discussion,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment