Test for text_list
Add a functional test for the new feature.
This commit is contained in:
parent
fece5a3486
commit
b1fcc93aa5
|
@ -19,12 +19,14 @@
|
|||
<input type="hidden" name="category" value="<%= params['category'] %>"/>
|
||||
<%- end -%>
|
||||
<ul id="sortable_pages" style="list-style-type:none">
|
||||
<%- @pages_in_category.each do |page| -%>
|
||||
<% @pages_in_category.each do |page| %>
|
||||
<% content_tag_for :li, page do %>
|
||||
<input type="checkbox" name="<%= page.name %>" value="tex"/>
|
||||
|
||||
<input type="checkbox" name="<%= page.name %>" value="tex"/>
|
||||
<%= link_to_existing_page page, truncate(page.plain_name, :length => 35) %>
|
||||
<% end %>
|
||||
<%- end -%>
|
||||
|
||||
<% end %>
|
||||
</ul>
|
||||
<%= sortable_element('sortable_pages') %>
|
||||
<p> Export selected pages (drag to re-order them) to a LaTeX file.
|
||||
|
|
|
@ -1345,6 +1345,27 @@ Page2 contents $\mathbb{01234}$.
|
|||
!, r.body
|
||||
end
|
||||
|
||||
def test_tex_list
|
||||
@wiki.write_page('wiki1', 'Page2',
|
||||
"Page2 contents $\\mathbb{01234}$.\n",
|
||||
Time.now, Author.new('AnotherAuthor', '127.0.0.2'), x_test_renderer)
|
||||
r = process('tex_list', 'web' => 'wiki1', 'Page2' => 'tex', 'BogusPage'=> 'tex', 'HomePage' => 'tex')
|
||||
assert_response(:success)
|
||||
assert_equal @tex_header1 + "\\usepackage{mathbbol}\n" + @tex_header2 + %q!\section*{Page2}
|
||||
|
||||
Page2 contents $\mathbb{01234}$.
|
||||
|
||||
\section*{HomePage}
|
||||
|
||||
HisWay would be MyWay $\sin(x) \includegraphics[width=3em]{foo}$ in kinda ThatWay in HisWay though MyWay $\backslash$OverThere --{} see SmartEngine in that SmartEngineGUI
|
||||
|
||||
|
||||
|
||||
|
||||
\end{document}
|
||||
!, r.body
|
||||
end
|
||||
|
||||
def test_web_list
|
||||
another_wiki = @wiki.create_web('Another Wiki', 'another_wiki')
|
||||
|
||||
|
|
Loading…
Reference in a new issue