From 31c6ebb31046470d41a625195662dfccdff116c4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Dec 2007 19:10:24 +0000 Subject: 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 --- test/fixtures/wiki_content_versions.yml | 2 +- test/functional/wiki_controller_test.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'test') 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', -- cgit v1.2.3