Rails3: test: scm: move "repository_path_hash" method in repositories routing test to test_helper.rb for common use
Rails3 new route format returns path param as string not array. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8923 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
aa286a8e3f
commit
21cb2ee817
|
@ -366,13 +366,4 @@ class RoutingRepositoriesTest < ActionController::IntegrationTest
|
|||
{ :controller => 'repositories', :action => 'remove_related_issue', :id => 'redmine', :repository_id => 'foo', :rev => '123', :issue_id => '25' }
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def repository_path_hash(arr)
|
||||
hs = {}
|
||||
hs[:path] = arr.join("/")
|
||||
hs[:param] = arr
|
||||
hs
|
||||
end
|
||||
end
|
||||
|
|
|
@ -143,6 +143,13 @@ class ActiveSupport::TestCase
|
|||
File.directory?(repository_path(vendor))
|
||||
end
|
||||
|
||||
def repository_path_hash(arr)
|
||||
hs = {}
|
||||
hs[:path] = arr.join("/")
|
||||
hs[:param] = arr
|
||||
hs
|
||||
end
|
||||
|
||||
def assert_error_tag(options={})
|
||||
assert_tag({:attributes => { :id => 'errorExplanation' }}.merge(options))
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue