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
|
||||
|
||||
context "issue categories" do
|
||||
should_route :get, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'index', :project_id => 'foo'
|
||||
should_route :get, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'xml'
|
||||
should_route :get, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'index', :project_id => 'foo', :format => 'json'
|
||||
|
||||
should_route :get, "/projects/foo/issue_categories/new", :controller => 'issue_categories', :action => 'new', :project_id => 'foo'
|
||||
|
||||
should_route :post, "/projects/foo/issue_categories", :controller => 'issue_categories', :action => 'create', :project_id => 'foo'
|
||||
should_route :post, "/projects/foo/issue_categories.xml", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'xml'
|
||||
should_route :post, "/projects/foo/issue_categories.json", :controller => 'issue_categories', :action => 'create', :project_id => 'foo', :format => 'json'
|
||||
|
||||
should_route :get, "/issue_categories/1", :controller => 'issue_categories', :action => 'show', :id => '1'
|
||||
should_route :get, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'xml'
|
||||
should_route :get, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'show', :id => '1', :format => 'json'
|
||||
|
||||
should_route :get, "/issue_categories/1/edit", :controller => 'issue_categories', :action => 'edit', :id => '1'
|
||||
|
||||
should_route :put, "/issue_categories/1", :controller => 'issue_categories', :action => 'update', :id => '1'
|
||||
should_route :put, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'xml'
|
||||
should_route :put, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'update', :id => '1', :format => 'json'
|
||||
|
||||
should_route :delete, "/issue_categories/1", :controller => 'issue_categories', :action => 'destroy', :id => '1'
|
||||
should_route :delete, "/issue_categories/1.xml", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'xml'
|
||||
should_route :delete, "/issue_categories/1.json", :controller => 'issue_categories', :action => 'destroy', :id => '1', :format => 'json'
|
||||
def test_issue_categories
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/issue_categories" },
|
||||
{ :controller => 'issue_categories', :action => 'index',
|
||||
:project_id => 'foo' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/issue_categories.xml" },
|
||||
{ :controller => 'issue_categories', :action => 'index',
|
||||
:project_id => 'foo', :format => 'xml' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/issue_categories.json" },
|
||||
{ :controller => 'issue_categories', :action => 'index',
|
||||
:project_id => 'foo', :format => 'json' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'get', :path => "/projects/foo/issue_categories/new" },
|
||||
{ :controller => 'issue_categories', :action => 'new',
|
||||
:project_id => 'foo' }
|
||||
)
|
||||
assert_routing(
|
||||
{ :method => 'post', :path => "/projects/foo/issue_categories" },
|
||||
{ :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
|
||||
|
||||
def test_issue_relations
|
||||
|
|
Loading…
Reference in New Issue