From: Toshi MARUYAMA Date: Thu, 23 Feb 2012 08:49:05 +0000 (+0000) Subject: Rails3: test: scm: bazaar: use "repository_path_hash" for path param X-Git-Tag: 1.4.0~387 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d086683b17665719aa352074288b90ba954e6db0;p=redmine.git 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 --- 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',