Extacted rendering logic from the model

This commit is contained in:
Alexey Verkhovsky 2005-09-09 05:31:27 +00:00
parent acfae2818c
commit 427f989d69
19 changed files with 550 additions and 525 deletions

View file

@ -96,8 +96,8 @@ class FileControllerTest < Test::Unit::TestCase
@wiki.revise_page('wiki1', 'HomePage', '[[instiki-e2e.txt:file]]', Time.now, 'AnonymousBrave')
assert_equal "<p><span class=\"newWikiWord\">instiki-e2e.txt" +
"<a href=\"../file/instiki-e2e.txt\">?</a></span></p>",
@home.display_content
PageRenderer.new(@home.revisions.last).display_content
# rails-e2e.gif is unknown to the system, so pic action goes to the file [upload] form
r = process 'file', 'web' => 'wiki1', 'id' => 'instiki-e2e.txt'
assert_success
@ -114,7 +114,7 @@ class FileControllerTest < Test::Unit::TestCase
@home = Page.find(@home.id)
assert_equal "<p><a class=\"existingWikiWord\" href=\"../file/instiki-e2e.txt\">" +
"instiki-e2e.txt</a></p>",
@home.display_content
PageRenderer.new(@home.revisions.last).display_content
end
def test_uploads_blocking

View file

@ -364,7 +364,7 @@ class WikiControllerTest < Test::Unit::TestCase
def test_rss_with_content
r = process 'rss_with_content', 'web' => 'wiki1'
assert_success
pages = r.template_objects['pages_by_revision']
assert_equal [@elephant, @oak, pages(:no_wiki_word), pages(:that_way), pages(:smart_engine), pages(:my_way), pages(:first_page), @home], pages,