diff options
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r-- | test/functional/wiki_controller_test.rb | 14 |
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', |