diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-24 17:58:34 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-24 17:58:34 +0000 |
commit | 193b2450f47a8e6eb9f6ff6fc5a6895e469b78eb (patch) | |
tree | 2f4c94520013c1128eee646dd31c43cd6962cfb6 /test | |
parent | 9d4e71adf35656c5a06d782b24502fa121ff10b2 (diff) | |
download | redmine-193b2450f47a8e6eb9f6ff6fc5a6895e469b78eb.tar.gz redmine-193b2450f47a8e6eb9f6ff6fc5a6895e469b78eb.zip |
Fixed: View differences for individual file of a changeset fails if the subversion repository URL doesn't point to the repository root (#1209, #1262, #1275).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1446 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/changes.yml | 7 | ||||
-rw-r--r-- | test/functional/repositories_subversion_controller_test.rb | 26 |
2 files changed, 33 insertions, 0 deletions
diff --git a/test/fixtures/changes.yml b/test/fixtures/changes.yml index 30acbd02d..56d936296 100644 --- a/test/fixtures/changes.yml +++ b/test/fixtures/changes.yml @@ -13,4 +13,11 @@ changes_002: path: /test/some/path/elsewhere/in/the/repo
from_path:
from_revision:
+changes_003:
+ id: 3
+ changeset_id: 101
+ action: M
+ path: /test/some/path/in/the/repo
+ from_path:
+ from_revision:
\ No newline at end of file diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index dd56947fc..bc3f261a0 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -97,6 +97,32 @@ class RepositoriesSubversionControllerTest < Test::Unit::TestCase assert_equal 'folder', assigns(:entry).name end + def test_revision + get :revision, :id => 1, :rev => 2 + assert_response :success + assert_template 'revision' + assert_tag :tag => 'tr', + :child => { :tag => 'td', :content => %r{/test/some/path/in/the/repo} }, + :child => { :tag => 'td', + :child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/test/some/path/in/the/repo?rev=2' } } + } + end + + def test_revision_with_repository_pointing_to_a_subdirectory + r = Project.find(1).repository + # Changes repository url to a subdirectory + r.update_attribute :url, (r.url + '/test/some') + + get :revision, :id => 1, :rev => 2 + assert_response :success + assert_template 'revision' + assert_tag :tag => 'tr', + :child => { :tag => 'td', :content => %r{/test/some/path/in/the/repo} }, + :child => { :tag => 'td', + :child => { :tag => 'a', :attributes => { :href => '/repositories/diff/ecookbook/path/in/the/repo?rev=2' } } + } + end + def test_diff get :diff, :id => 1, :rev => 3 assert_response :success |