diff options
author | Sebastian Staudt <koraktor@gmail.com> | 2012-05-11 01:25:29 +0400 |
---|---|---|
committer | Sebastian Staudt <koraktor@gmail.com> | 2012-05-12 00:49:26 +0400 |
commit | e93b1f16b27f5090f531000d4aef7f3f8445a5f6 (patch) | |
tree | 18e0661f8016a209aef8f75ea7f844da2bed2db6 /test | |
parent | 4fba176f3e117c41200f7a95749dd58bc22b3d12 (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.rb | 10 |
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 |