gitlab-org--gitlab-foss/spec/controllers
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 Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
ci Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
dashboard Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
explore Fix a transient failure in the Explore::ProjectsController spec 2017-01-27 11:57:06 -05:00
groups Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
import Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
oauth
profiles Add a controller spec for personal access tokens. 2016-12-16 16:29:32 +05:30
projects Fix 500 error while navigating to the pages_domains 'show' page. 2017-01-31 22:55:33 +00:00
abuse_reports_controller_spec.rb
application_controller_spec.rb Add nested groups support to the routing 2016-11-23 14:08:36 +02:00
autocomplete_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
blob_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
groups_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
health_check_controller_spec.rb Revert "Merge branch 'revert-9cac0317' into 'master' " 2017-01-23 16:35:24 +01:00
help_controller_spec.rb Fix URL rewritting in the Help section 2016-12-01 16:40:48 +01:00
invites_controller_spec.rb
notification_settings_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
projects_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
registrations_controller_spec.rb Properly handle failed reCAPTCHA on user registration 2017-01-03 01:35:42 -06:00
root_controller_spec.rb
search_controller_spec.rb Merge branch 'jej-note-search-uses-finder' into 'security' 2016-12-15 11:40:12 -03:00
sent_notifications_controller_spec.rb
sessions_controller_spec.rb fix: 24982- Remove'Signed in successfully' message 2016-12-07 20:30:28 +05:30
snippets_controller_spec.rb Ensure user is authenticated to create a new snippet 2016-11-28 16:57:49 +01:00
uploads_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00
users_controller_spec.rb Use empty_project where possible in controller specs 2017-01-25 17:14:38 -05:00