Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
e4aa197c30
1 changed files with 26 additions and 0 deletions
|
@ -1004,6 +1004,32 @@ class WikiControllerTest < ActionController::TestCase
|
|||
assert_match /<p>Nonrecursive-include:<\/p>\n\n<p>extra fun<\/p>\n\n<p><a class='existingWikiWord' href='\/wiki1\/show\/HomePage'>HomePage<\/a><\/p>/, r.body
|
||||
end
|
||||
|
||||
def test_divref
|
||||
@wiki.write_page('wiki1', 'Bar', "+-- \{: .num_lemma #Leftcosetsdisjoint\}\n###### Lem" +
|
||||
"ma\nLet $H$ be a subgroup of a group $G$, and let $x$ and $y$ be elements\n of $G$" +
|
||||
". Suppose that $x H \\cap y H$ is non-empty. Then $x H = y H$.\n=--\n\n See Lemma \\" +
|
||||
"ref\{Leftcosetsdisjoint\}.", Time.now,
|
||||
Author.new('AnotherAuthor', '127.0.0.2'), x_test_renderer)
|
||||
|
||||
r = process('show', 'id' => 'Bar', 'web' => 'wiki1')
|
||||
|
||||
assert_response :success
|
||||
resp = %{<div class='num_lemma' id='Leftcosetsdisjoint'>\n<h6 id='lemma_1'>Lemma</h6>\n\n} +
|
||||
%{<p>Let <math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Mat} +
|
||||
%{h/MathML'><mi>H</mi></math> be a subgroup of a group <math class='maruku-mathml' displ} +
|
||||
%{ay='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>G</mi></math>, and let <ma} +
|
||||
%{th class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Math/MathML'>} +
|
||||
%{<mi>x</mi></math> and <math class='maruku-mathml' display='inline' xmlns='http://www.} +
|
||||
%{w3.org/1998/Math/MathML'><mi>y</mi></math> be elements of <math class='maruku-mathml'} +
|
||||
%{ display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>G</mi></math>. Suppo} +
|
||||
%{se that <math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1998/Ma} +
|
||||
%{th/MathML'><mi>x</mi><mi>H</mi><mo>\342\210\251</mo><mi>y</mi><mi>H</mi></math> is no} +
|
||||
%{n-empty. Then <math class='maruku-mathml' display='inline' xmlns='http://www.w3.org/1} +
|
||||
%{998/Math/MathML'><mi>x</mi><mi>H</mi><mo>=</mo><mi>y</mi><mi>H</mi></math>.</p>\n</di} +
|
||||
%{v>\n\n<p>See Lemma <a class='maruku-ref' href='#Leftcosetsdisjoint'>1</a>.</p>}
|
||||
assert_match Regexp.new(resp), r.body
|
||||
end
|
||||
|
||||
def test_show_page_nonexistant_page
|
||||
process('show', 'id' => 'UnknownPage', 'web' => 'wiki1')
|
||||
assert_redirected_to :web => 'wiki1', :controller => 'wiki', :action => 'new', :id => 'UnknownPage'
|
||||
|
|
Loading…
Reference in a new issue