Merged r1307 to r1369 from trunk.

git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1370 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-04-28 10:36:12 +00:00
parent be071deae2
commit 10191813ec
139 changed files with 1936 additions and 874 deletions
+6 -2
View File
@@ -22,7 +22,7 @@ require 'wiki_controller'
class WikiController; def rescue_action(e) raise e end; end
class WikiControllerTest < Test::Unit::TestCase
fixtures :projects, :users, :roles, :members, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
fixtures :projects, :users, :roles, :members, :enabled_modules, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions, :attachments
def setup
@controller = WikiController.new
@@ -43,6 +43,10 @@ class WikiControllerTest < Test::Unit::TestCase
assert_response :success
assert_template 'show'
assert_tag :tag => 'h1', :content => /Another page/
# Included page with an inline image
assert_tag :tag => 'p', :content => /This is an inline image/
assert_tag :tag => 'img', :attributes => { :src => '/attachments/download/3',
:alt => 'This is a logo' }
end
def test_show_unexistent_page_without_edit_right
@@ -147,7 +151,7 @@ class WikiControllerTest < Test::Unit::TestCase
assert_template 'special_page_index'
pages = assigns(:pages)
assert_not_nil pages
assert_equal 2, pages.size
assert_equal Project.find(1).wiki.pages.size, pages.size
assert_tag :tag => 'a', :attributes => { :href => '/wiki/ecookbook/CookBook_documentation' },
:content => /CookBook documentation/
end