gitlab-org--gitlab-foss/spec/routing
Timothy Andrew 86f4767dc1 Fix 500 error while navigating to the pages_domains 'show' page.
==================
= Implementation =
==================

1. The path of the page is of the form 'group/project/pages/domains/<domain_name>'
2. Rails looks at `params[:id]` (which should be the domain name), and finds the
   relevant model record.
3. Given a domain like `foo.bar`, Rails sets `params[:id]` to `foo` (should be
   `foo.bar`), and sets `params[:format]` to `bar`
4. This commit fixes the issue by adding a route constraint, so that
   `params[:id]` is set to the entire `foo.bar` domain name.

=========
= Tests =
=========

1. Add controller specs for the `PagesDomainController`. These are
   slightly orthogonal to this bug fix (they don't fail when this bug is
   present), but should be present nonetheless.
2. Add routing specs that catch this bug (by asserting that the `id`
   param is passed as expected when it contains a domain name).
3. Modify the 'RESTful project resources' routing spec shared example to
   accomodate controllers where the controller path (such as
   `pages/domains`) is different from the controller name (such as
   `pages_domains`).
2017-01-31 22:55:33 +00:00
..
admin_routing_spec.rb Fix 500 error when visit group from admin area if group name contains dot 2016-12-28 13:43:08 +02:00
import_routing_spec.rb Modify GithubImport to support Gitea 2016-12-19 17:35:51 +01:00
notifications_routing_spec.rb Updated rspec to rspec 3.x syntax 2015-02-12 19:17:35 +01:00
project_routing_spec.rb Fix 500 error while navigating to the pages_domains 'show' page. 2017-01-31 22:55:33 +00:00
routing_spec.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00