diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-23 08:49:05 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-02-23 08:49:05 +0000 |
commit | d086683b17665719aa352074288b90ba954e6db0 (patch) | |
tree | 017e739d599a447aa1265e7e7bce531752cd61f4 /test/functional/repositories_bazaar_controller_test.rb | |
parent | 00ec4e189fb1bf4c77df7fbe9584e6058521ebd1 (diff) | |
download | redmine-d086683b17665719aa352074288b90ba954e6db0.tar.gz redmine-d086683b17665719aa352074288b90ba954e6db0.zip |
Rails3: test: scm: bazaar: use "repository_path_hash" for path param
Rails3 new route format returns path param as string not array.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8927 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_bazaar_controller_test.rb')
-rw-r--r-- | test/functional/repositories_bazaar_controller_test.rb | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb index 099c05088..9e5714f38 100644 --- a/test/functional/repositories_bazaar_controller_test.rb +++ b/test/functional/repositories_bazaar_controller_test.rb @@ -58,7 +58,7 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase end def test_browse_directory - get :show, :id => PRJ_ID, :path => ['directory'] + get :show, :id => PRJ_ID, :path => repository_path_hash(['directory'])[:param] assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -70,7 +70,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase end def test_browse_at_given_revision - get :show, :id => PRJ_ID, :path => [], :rev => 3 + get :show, :id => PRJ_ID, :path => repository_path_hash([])[:param], + :rev => 3 assert_response :success assert_template 'show' assert_not_nil assigns(:entries) @@ -79,14 +80,16 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase end def test_changes - get :changes, :id => PRJ_ID, :path => ['doc-mkdir.txt'] + get :changes, :id => PRJ_ID, + :path => repository_path_hash(['doc-mkdir.txt'])[:param] assert_response :success assert_template 'changes' assert_tag :tag => 'h2', :content => 'doc-mkdir.txt' end def test_entry_show - get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'] + get :entry, :id => PRJ_ID, + :path => repository_path_hash(['directory', 'doc-ls.txt'])[:param] assert_response :success assert_template 'entry' # Line 19 @@ -97,14 +100,17 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase end def test_entry_download - get :entry, :id => PRJ_ID, :path => ['directory', 'doc-ls.txt'], :format => 'raw' + get :entry, :id => PRJ_ID, + :path => repository_path_hash(['directory', 'doc-ls.txt'])[:param], + :format => 'raw' assert_response :success # File content assert @response.body.include?('Show help message') end def test_directory_entry - get :entry, :id => PRJ_ID, :path => ['directory'] + get :entry, :id => PRJ_ID, + :path => repository_path_hash(['directory'])[:param] assert_response :success assert_template 'show' assert_not_nil assigns(:entry) @@ -127,7 +133,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase end def test_annotate - get :annotate, :id => PRJ_ID, :path => ['doc-mkdir.txt'] + get :annotate, :id => PRJ_ID, + :path => repository_path_hash(['doc-mkdir.txt'])[:param] assert_response :success assert_template 'annotate' assert_tag :tag => 'th', :content => '2', |