diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 15:47:28 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-06-15 15:47:28 +0000 |
commit | ca6e69ec247e10c521f22fba542404720cc2ebff (patch) | |
tree | d0f7633f5f0ee55e6c4b9e99397b3ae4d142a420 /test/functional | |
parent | 93b3dba926ef9593c6849b2e84f57de176c595f1 (diff) | |
download | redmine-ca6e69ec247e10c521f22fba542404720cc2ebff.tar.gz redmine-ca6e69ec247e10c521f22fba542404720cc2ebff.zip |
Fixed: view file at given revision with CVS.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1553 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/repositories_cvs_controller_test.rb | 13 | ||||
-rw-r--r-- | test/functional/repositories_subversion_controller_test.rb | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/repositories_cvs_controller_test.rb b/test/functional/repositories_cvs_controller_test.rb index e12bb53ac..254fbc69c 100644 --- a/test/functional/repositories_cvs_controller_test.rb +++ b/test/functional/repositories_cvs_controller_test.rb @@ -89,6 +89,19 @@ class RepositoriesCvsControllerTest < Test::Unit::TestCase get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'] assert_response :success assert_template 'entry' + assert_no_tag :tag => 'td', :attributes => { :class => /line-code/}, + :content => /before_filter/ + end + + def test_entry_at_given_revision + # changesets must be loaded + Project.find(1).repository.fetch_changesets + get :entry, :id => 1, :path => ['sources', 'watchers_controller.rb'], :rev => 2 + assert_response :success + assert_template 'entry' + # this line was removed in r3 + assert_tag :tag => 'td', :attributes => { :class => /line-code/}, + :content => /before_filter/ end def test_entry_not_found diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index efb824992..6af5cd5dd 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -78,6 +78,15 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase assert_template 'entry' end + def test_entry_at_given_revision + get :entry, :id => 1, :path => ['subversion_test', 'helloworld.rb'], :rev => 2 + assert_response :success + assert_template 'entry' + # this line was removed in r3 and file was moved in r6 + assert_tag :tag => 'td', :attributes => { :class => /line-code/}, + :content => /Here's the code/ + end + def test_entry_not_found get :entry, :id => 1, :path => ['subversion_test', 'zzz.c'] assert_tag :tag => 'div', :attributes => { :class => /error/ }, |