summaryrefslogtreecommitdiffstats
path: root/test/functional/wiki_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-20 19:10:24 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-20 19:10:24 +0000
commit31c6ebb31046470d41a625195662dfccdff116c4 (patch)
treeab099bc278f30009158a7afe93a1ca46e9594ef9 /test/functional/wiki_controller_test.rb
parent3d5381b24bb488e4e9edd5a9eec2ba8be4de5c63 (diff)
downloadredmine-31c6ebb31046470d41a625195662dfccdff116c4.tar.gz
redmine-31c6ebb31046470d41a625195662dfccdff116c4.zip
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
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r--test/functional/wiki_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index 043b0e805..0418a02b6 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -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',