test: route: split queries tests
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8424 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e754883df2
commit
2e1601cf27
@ -31,18 +31,10 @@ class RoutingQueriesTest < ActionController::IntegrationTest
|
|||||||
{ :method => 'get', :path => "/queries/new" },
|
{ :method => 'get', :path => "/queries/new" },
|
||||||
{ :controller => 'queries', :action => 'new' }
|
{ :controller => 'queries', :action => 'new' }
|
||||||
)
|
)
|
||||||
assert_routing(
|
|
||||||
{ :method => 'get', :path => "/projects/redmine/queries/new" },
|
|
||||||
{ :controller => 'queries', :action => 'new', :project_id => 'redmine' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'post', :path => "/queries" },
|
{ :method => 'post', :path => "/queries" },
|
||||||
{ :controller => 'queries', :action => 'create' }
|
{ :controller => 'queries', :action => 'create' }
|
||||||
)
|
)
|
||||||
assert_routing(
|
|
||||||
{ :method => 'post', :path => "/projects/redmine/queries" },
|
|
||||||
{ :controller => 'queries', :action => 'create', :project_id => 'redmine' }
|
|
||||||
)
|
|
||||||
assert_routing(
|
assert_routing(
|
||||||
{ :method => 'get', :path => "/queries/1/edit" },
|
{ :method => 'get', :path => "/queries/1/edit" },
|
||||||
{ :controller => 'queries', :action => 'edit', :id => '1' }
|
{ :controller => 'queries', :action => 'edit', :id => '1' }
|
||||||
@ -56,4 +48,15 @@ class RoutingQueriesTest < ActionController::IntegrationTest
|
|||||||
{ :controller => 'queries', :action => 'destroy', :id => '1' }
|
{ :controller => 'queries', :action => 'destroy', :id => '1' }
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_queries_scoped_under_project
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/projects/redmine/queries/new" },
|
||||||
|
{ :controller => 'queries', :action => 'new', :project_id => 'redmine' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'post', :path => "/projects/redmine/queries" },
|
||||||
|
{ :controller => 'queries', :action => 'create', :project_id => 'redmine' }
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user