Added wiki annotate view. It's accessible for each version from the page history view.

Slight style change: pre-wrap added on file/diff contents.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1020 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-12-20 19:10:24 +00:00
parent 3d5381b24b
commit 31c6ebb310
9 changed files with 114 additions and 2 deletions
+14
View File
@@ -98,6 +98,20 @@ class WikiControllerTest < Test::Unit::TestCase
:content => /updated/
end
def test_annotate
get :annotate, :id => 1, :page => 'CookBook_documentation', :version => 2
assert_response :success
assert_template 'annotate'
# Line 1
assert_tag :tag => 'tr', :child => { :tag => 'th', :attributes => {:class => 'line-num'}, :content => '1' },
:child => { :tag => 'td', :attributes => {:class => 'author'}, :content => /John Smith/ },
:child => { :tag => 'td', :content => /h1\. CookBook documentation/ }
# Line 2
assert_tag :tag => 'tr', :child => { :tag => 'th', :attributes => {:class => 'line-num'}, :content => '2' },
:child => { :tag => 'td', :attributes => {:class => 'author'}, :content => /redMine Admin/ },
:child => { :tag => 'td', :content => /Some updated \[\[documentation\]\] here/ }
end
def test_rename_with_redirect
@request.session[:user_id] = 2
post :rename, :id => 1, :page => 'Another_page',