diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-20 19:10:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-12-20 19:10:24 +0000 |
commit | 31c6ebb31046470d41a625195662dfccdff116c4 (patch) | |
tree | ab099bc278f30009158a7afe93a1ca46e9594ef9 /test | |
parent | 3d5381b24bb488e4e9edd5a9eec2ba8be4de5c63 (diff) | |
download | redmine-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')
-rw-r--r-- | test/fixtures/wiki_content_versions.yml | 2 | ||||
-rw-r--r-- | test/functional/wiki_controller_test.rb | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/test/fixtures/wiki_content_versions.yml b/test/fixtures/wiki_content_versions.yml index 547030ccf..260149060 100644 --- a/test/fixtures/wiki_content_versions.yml +++ b/test/fixtures/wiki_content_versions.yml @@ -4,7 +4,7 @@ wiki_content_versions_001: page_id: 1
id: 1
version: 1
- author_id: 1
+ author_id: 2
comments: Page creation
wiki_content_id: 1
compression: ""
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', |