diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index ac6a72e3..21f69f1e 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -1004,6 +1004,32 @@ class WikiControllerTest < ActionController::TestCase assert_match /

Nonrecursive-include:<\/p>\n\n

extra fun<\/p>\n\n

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 = %{

\n
Lemma
\n\n} + + %{

Let H be a subgroup of a group G, and let } + + %{x and y be elements of G. Suppo} + + %{se that xH\342\210\251yH is no} + + %{n-empty. Then xH=yH.

\n\n\n

See Lemma 1.

} + 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'