Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSebastian Staudt <koraktor@gmail.com>2012-05-11 01:25:29 +0400
committerSebastian Staudt <koraktor@gmail.com>2012-05-12 00:49:26 +0400
commite93b1f16b27f5090f531000d4aef7f3f8445a5f6 (patch)
tree18e0661f8016a209aef8f75ea7f844da2bed2db6 /test
parent4fba176f3e117c41200f7a95749dd58bc22b3d12 (diff)
Prepend 'git-' to man pages
This allows for shorter URLs like /docs/commit that will redirect to the correct ones.
Diffstat (limited to 'test')
-rw-r--r--test/functional/doc_controller_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/doc_controller_test.rb b/test/functional/doc_controller_test.rb
index 6a5157c0..67cf1b71 100644
--- a/test/functional/doc_controller_test.rb
+++ b/test/functional/doc_controller_test.rb
@@ -28,4 +28,14 @@ class DocControllerTest < ActionController::TestCase
get :man, :file => 'test-command', :version => 'v1.0'
assert_response :success
end
+
+ test "tries to prepend 'git-' to find a command" do
+ file = FactoryGirl.create(:doc_file, :name => 'git-commit')
+ doc = FactoryGirl.create(:doc, :plain => "Doc 1")
+ vers = FactoryGirl.create(:version, :name => "v1.0")
+ dver = FactoryGirl.create(:doc_version, :doc_file => file, :version => vers, :doc => doc)
+ get :man, :file => 'commit', :version => 'v1.0'
+ assert_response :success
+ end
+
end