test: replace "should_route" of "issue categories" to "assert_routing" at integration/routing_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8273 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
97efee2f08
commit
08c4b22988
|
@ -366,30 +366,88 @@ class RoutingTest < ActionController::IntegrationTest
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
context "issue categories" do
|
def test_issue_categories
|
||||||
should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo'
|
assert_routing(
|
||||||
should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml'
|
{ :method => 'get', :path => "/projects/foo/issue_categories" },
|
||||||
should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json'
|
{ :controller => 'issue_categories', :action => 'index',
|
||||||
|
:project_id => 'foo' }
|
||||||
should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo'
|
)
|
||||||
|
assert_routing(
|
||||||
should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo'
|
{ :method => 'get', :path => "/projects/foo/issue_categories.xml" },
|
||||||
should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml'
|
{ :controller => 'issue_categories', :action => 'index',
|
||||||
should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json'
|
:project_id => 'foo', :format => 'xml' }
|
||||||
|
)
|
||||||
should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1'
|
assert_routing(
|
||||||
should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml'
|
{ :method => 'get', :path => "/projects/foo/issue_categories.json" },
|
||||||
should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json'
|
{ :controller => 'issue_categories', :action => 'index',
|
||||||
|
:project_id => 'foo', :format => 'json' }
|
||||||
should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1'
|
)
|
||||||
|
assert_routing(
|
||||||
should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1'
|
{ :method => 'get', :path => "/projects/foo/issue_categories/new" },
|
||||||
should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml'
|
{ :controller => 'issue_categories', :action => 'new',
|
||||||
should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json'
|
:project_id => 'foo' }
|
||||||
|
)
|
||||||
should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1'
|
assert_routing(
|
||||||
should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml'
|
{ :method => 'post', :path => "/projects/foo/issue_categories" },
|
||||||
should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json'
|
{ :controller => 'issue_categories', :action => 'create',
|
||||||
|
:project_id => 'foo' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'post', :path => "/projects/foo/issue_categories.xml" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'create',
|
||||||
|
:project_id => 'foo', :format => 'xml' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'post', :path => "/projects/foo/issue_categories.json" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'create',
|
||||||
|
:project_id => 'foo', :format => 'json' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/issue_categories/1" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'show', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/issue_categories/1.xml" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'show', :id => '1',
|
||||||
|
:format => 'xml' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/issue_categories/1.json" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'show', :id => '1',
|
||||||
|
:format => 'json' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'get', :path => "/issue_categories/1/edit" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'edit', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'put', :path => "/issue_categories/1" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'update', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'put', :path => "/issue_categories/1.xml" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'update', :id => '1',
|
||||||
|
:format => 'xml' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'put', :path => "/issue_categories/1.json" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'update', :id => '1',
|
||||||
|
:format => 'json' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'delete', :path => "/issue_categories/1" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'destroy', :id => '1' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'delete', :path => "/issue_categories/1.xml" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'destroy', :id => '1',
|
||||||
|
:format => 'xml' }
|
||||||
|
)
|
||||||
|
assert_routing(
|
||||||
|
{ :method => 'delete', :path => "/issue_categories/1.json" },
|
||||||
|
{ :controller => 'issue_categories', :action => 'destroy', :id => '1',
|
||||||
|
:format => 'json' }
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_issue_relations
|
def test_issue_relations
|
||||||
|
|
Loading…
Reference in New Issue