Starts showing raw wiki text
Still needs some attention:
color to make it clearer that it isn't rendered
<% pagetext(@page.title, '(Raw wiki text)') do %> | 1 | ||
|---|---|---|---|
<% cache(:controller=> 'wiki', :action => 'raw', | 2 | ||
:page => @page.name, :locale_suffix => @locale) do %> | 3 | ||
<pre><%= h(@page.text) -%></pre> | 4 | ||
<% end %> | 5 | ||
<%= render :partial => 'editbar' %> | 6 | ||
<% end %> | 7 |
| 26 | 26 | ||
|---|---|---|---|
| 27 | include TestConfiguration | include TestConfiguration | 27 |
| 28 | 28 | ||
| 29 | fixtures :users, :pages, :revisions, :wiki_references | ||
| 30 | |||
| 31 | def setup | def setup | 29 |
| 32 | @controller = WikiController.new | @controller = WikiController.new | 30 |
| 33 | @request = ActionController::TestRequest.new | @request = ActionController::TestRequest.new | 31 |
| 461 more lines | |||
| 495 | assert false, "Refering page expired after text-only edition" | assert false, "Refering page expired after text-only edition" | 493 |
| 496 | end | end | 494 |
| 497 | 495 | ||
def test_shows_raw_wiki_text | 496 | ||
page = pages('multilanguage_page') | 497 | ||
get :raw, :page_name => page.name | 498 | ||
assert_tag :pre, :content => /'''bold'''.*segunda/m | 499 | ||
end | 500 | ||
| 501 | |||
| 498 | private | private | 502 |
| 499 | 503 | ||
| 500 | def log_as(user_name) | def log_as(user_name) | 504 |