Extract validation of absolute path...

... so we can re-use it elsewhere
Add rendering_app to ContentItem
Register ContentItem routes

A set of routes gets registered for a ContentItem when it is saved to
the store.
Correct typo in factory
Prevent real web requests during tests

Relies on GdsApi::TestHelpers::Router and webmock to stub out route
registration calls
Store registered routes after registration

We store the routes that were registered in the same format as they
would have been set.
Ignore base_path in request data

We use the base_path as defined in the routing params so we can ignore
completely base_path as it appears in the request body. We want to avoid
mass-assigning base_path as, although the alias of _id to base_path
prevents it being saved in the database, it doesn't prevent the virtual
base_path attribute from being set, which screws up the registerable
route calculations
Tighten up rules around route validation

Specifically we want to reject routes that are a string-prefix of the
base_path, but not an actual folder below the base_path.
Globally stub all route registration by default

We can still verify the expected router calls were made (or not made)
where required using assert_requested/assert_not_requested
Tighten up route registration coverage

Instead of mocking internal code, we verify the appropriate route
registration requests were made using webmock helpers. This brings us
closer to an end-to-end test for creating and updating content items.
Do not implicitly create route for base_path

This was too much magic. Better to require that all routes are
explicitly set when creating/updating content.
Merge pull request #19 from alphagov/route-registration

Add ContentItem route registration