Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki

This commit is contained in:
Jacques Distler 2009-08-12 12:22:46 -05:00
commit b1117a19c6
2 changed files with 8 additions and 1 deletions

View file

@ -35,4 +35,7 @@
expression. That's actually what Instiki uses, so go right ahead and flex your expression. That's actually what Instiki uses, so go right ahead and flex your
"[a-z]*Leet?RegExpSkill(s|z)" "[a-z]*Leet?RegExpSkill(s|z)"
</p> </p>
<p>
<b>Create a new page, named:</b> "<span class='newWikiWord'><%= link_to h(params[:query]), :web => @web.address, :action => 'new', :id => params[:query] %></span>"
</p>
<%- end -%> <%- end -%>

View file

@ -782,11 +782,15 @@ class WikiControllerTest < ActionController::TestCase
end end
def test_search_zero_results 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_response(:success)
assert_equal [], r.template_objects['results'] assert_equal [], r.template_objects['results']
assert_equal [], r.template_objects['title_results'] assert_equal [], r.template_objects['title_results']
create_pattern = Regexp.new(Regexp.escape(%{<b>Create a new page, named:</b> \"}+
%{<span class='newWikiWord'><a href=\"/wiki1/new/non-existant+%3C+t}+
%{ext\">non-existant &lt; text</a></span>}))
assert_match create_pattern, r.body
end end
def test_search_null_in_query def test_search_null_in_query