From 8cf26c924983a2c5613e81d095850a2a00ac2e2f Mon Sep 17 00:00:00 2001
From: Jacques Distler
+ Create a new page, named: "<%= link_to h(params[:query]), :web => @web.address, :action => 'new', :id => params[:query] %>" +
<%- end -%> diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index dc0a64a1..b546c43b 100755 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -782,11 +782,15 @@ class WikiControllerTest < ActionController::TestCase end def test_search_zero_results - r = process 'search', 'web' => 'wiki1', 'query' => 'non-existant text' + r = process 'search', 'web' => 'wiki1', 'query' => 'non-existant < text' assert_response(:success) assert_equal [], r.template_objects['results'] assert_equal [], r.template_objects['title_results'] + create_pattern = Regexp.new(Regexp.escape(%{Create a new page, named: \"}+ + %{non-existant < text})) + assert_match create_pattern, r.body end def test_search_null_in_query