summaryrefslogtreecommitdiffstats
path: root/test/functional/repositories_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-16 19:39:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-11-16 19:39:16 +0000
commite24358bc4374f68ad3000e88ae4c3f686b1f4b2b (patch)
treec204ed7797afd4dcb9e9fff4fd639b08b3a5c6eb /test/functional/repositories_controller_test.rb
parentdfd0b8bcdf2aa039b67a3a2f06dbbe8153972140 (diff)
downloadredmine-e24358bc4374f68ad3000e88ae4c3f686b1f4b2b.tar.gz
redmine-e24358bc4374f68ad3000e88ae4c3f686b1f4b2b.zip
Use /raw/ for url instead of ?format=raw for getting raw repository files (#1901, #4119).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3074 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/repositories_controller_test.rb')
-rw-r--r--test/functional/repositories_controller_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/repositories_controller_test.rb b/test/functional/repositories_controller_test.rb
index 5ff2a6a92..7ed7b5bbc 100644
--- a/test/functional/repositories_controller_test.rb
+++ b/test/functional/repositories_controller_test.rb
@@ -144,6 +144,20 @@ class RepositoriesControllerTest < ActionController::TestCase
:controller => 'repositories', :action => 'entry', :id => 'restmine', :path => %w[path to file.c], :rev => '2'
)
end
+
+ def test_raw_routing
+ assert_routing(
+ {:method => :get, :path => '/projects/restmine/repository/raw/path/to/file.c'},
+ :controller => 'repositories', :action => 'entry', :id => 'restmine', :path => %w[path to file.c], :format => 'raw'
+ )
+ end
+
+ def test_raw_routing_with_revision
+ assert_routing(
+ {:method => :get, :path => '/projects/restmine/repository/revisions/2/raw/path/to/file.c'},
+ :controller => 'repositories', :action => 'entry', :id => 'restmine', :path => %w[path to file.c], :format => 'raw', :rev => '2'
+ )
+ end
def test_annotate_routing
assert_routing(