Defect #40208 » 40208-v2.patch
| config/routes.rb | ||
|---|---|---|
|
match 'uploads', :to => 'attachments#upload', :via => :post
|
||
|
get 'robots', :to => 'welcome#robots'
|
||
|
get 'robots.:format', :to => 'welcome#robots', :constraints => {format: 'txt'}
|
||
|
Redmine::Plugin.directory.glob("*/config/routes.rb").sort.each do |plugin_routes_path|
|
||
|
instance_eval(plugin_routes_path.read, plugin_routes_path.to_s)
|
||
| test/integration/welcome_test.rb | ||
|---|---|---|
|
assert @response.body.match(%r{^Disallow: /\r?$})
|
||
|
end
|
||
|
end
|
||
|
def test_robots_should_not_respond_to_unsupported_formats
|
||
|
%w(robots.json robots).each do |file|
|
||
|
get "/#{file}"
|
||
|
assert_response :not_found
|
||
|
end
|
||
|
end
|
||
|
end
|
||
- « Previous
- 1
- 2
- Next »