mirror of
				https://github.com/redmine/redmine.git
				synced 2025-11-03 20:06:24 +01:00 
			
		
		
		
	Isolates all API routing tests to a specific test case.
git-svn-id: http://svn.redmine.org/redmine/trunk@13604 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
		@@ -132,55 +132,4 @@ class RoutingWikiTest < ActionDispatch::IntegrationTest
 | 
			
		||||
          :id => 'ladida', :version => '3' }
 | 
			
		||||
      )
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def test_api
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'get', :path => "/projects/567/wiki/my_page.xml" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'show', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'xml' }
 | 
			
		||||
        )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'get', :path => "/projects/567/wiki/my_page.json" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'show', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'json' }
 | 
			
		||||
        )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
         { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/2.xml" },
 | 
			
		||||
         { :controller => 'wiki', :action => 'show', :project_id => '1',
 | 
			
		||||
           :id => 'CookBook_documentation', :version => '2', :format => 'xml' }
 | 
			
		||||
       )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
         { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/2.json" },
 | 
			
		||||
         { :controller => 'wiki', :action => 'show', :project_id => '1',
 | 
			
		||||
           :id => 'CookBook_documentation', :version => '2', :format => 'json' }
 | 
			
		||||
       )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
         { :method => 'get', :path => "/projects/567/wiki/index.xml" },
 | 
			
		||||
         { :controller => 'wiki', :action => 'index', :project_id => '567', :format => 'xml' }
 | 
			
		||||
       )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
         { :method => 'get', :path => "/projects/567/wiki/index.json" },
 | 
			
		||||
         { :controller => 'wiki', :action => 'index', :project_id => '567', :format => 'json' }
 | 
			
		||||
       )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'put', :path => "/projects/567/wiki/my_page.xml" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'update', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'xml' }
 | 
			
		||||
      )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'put', :path => "/projects/567/wiki/my_page.json" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'update', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'json' }
 | 
			
		||||
      )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'delete', :path => "/projects/567/wiki/my_page.xml" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'destroy', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'xml' }
 | 
			
		||||
      )
 | 
			
		||||
    assert_routing(
 | 
			
		||||
        { :method => 'delete', :path => "/projects/567/wiki/my_page.json" },
 | 
			
		||||
        { :controller => 'wiki', :action => 'destroy', :project_id => '567',
 | 
			
		||||
          :id => 'my_page', :format => 'json' }
 | 
			
		||||
      )
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user