diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 19:44:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-10-25 19:44:04 +0000 |
commit | 9e313087205721ed3c6239be7cde55598d29f9e6 (patch) | |
tree | c5ba4ab52453907afae728887b470f95008bbbdb /test/integration/routing/wiki_test.rb | |
parent | b2e035fa96e4c2b06dcd559850d11987ba96ee1c (diff) | |
download | redmine-9e313087205721ed3c6239be7cde55598d29f9e6.tar.gz redmine-9e313087205721ed3c6239be7cde55598d29f9e6.zip |
REST API for retrieving wiki pages (#7082).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10716 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration/routing/wiki_test.rb')
-rw-r--r-- | test/integration/routing/wiki_test.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/integration/routing/wiki_test.rb b/test/integration/routing/wiki_test.rb index e7f6fa0f7..29b305cd6 100644 --- a/test/integration/routing/wiki_test.rb +++ b/test/integration/routing/wiki_test.rb @@ -34,6 +34,16 @@ class RoutingWikiTest < ActionController::IntegrationTest :id => 'lalala', :format => 'pdf' } ) assert_routing( + { :method => 'get', :path => "/projects/567/wiki/lalala.xml" }, + { :controller => 'wiki', :action => 'show', :project_id => '567', + :id => 'lalala', :format => 'xml' } + ) + assert_routing( + { :method => 'get', :path => "/projects/567/wiki/lalala.json" }, + { :controller => 'wiki', :action => 'show', :project_id => '567', + :id => 'lalala', :format => 'json' } + ) + assert_routing( { :method => 'get', :path => "/projects/1/wiki/CookBook_documentation/diff" }, { :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation' } @@ -44,6 +54,16 @@ class RoutingWikiTest < ActionController::IntegrationTest :id => 'CookBook_documentation', :version => '2' } ) 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/1/wiki/CookBook_documentation/2/diff" }, { :controller => 'wiki', :action => 'diff', :project_id => '1', :id => 'CookBook_documentation', :version => '2' } @@ -72,6 +92,14 @@ class RoutingWikiTest < ActionController::IntegrationTest { :method => 'get', :path => "/projects/567/wiki/index" }, { :controller => 'wiki', :action => 'index', :project_id => '567' } ) + 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' } + ) end def test_wiki_resources |