[openstreetmap/openstreetmap-website] Refactor site controller tests to inherit from ActionDispatch::IntegrationTest (#2596)

Andy Allan notifications at github.com
Wed Apr 22 09:24:44 UTC 2020


This is the modern way of writing controller tests, since it uses the rails middleware (among other things) and leads to more realistic tests.

Refs #2563

If we're all happy with this, then I can refactor all the remaining controller tests in order to unblock #2563 
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/2596

-- Commit Summary --

  * Refactor site controller tests to inherit from ActionDispatch::IntegrationTest

-- File Changes --

    M config/routes.rb (2)
    M test/controllers/site_controller_test.rb (156)
    M test/test_helper.rb (5)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/2596.patch
https://github.com/openstreetmap/openstreetmap-website/pull/2596.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2596
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200422/7cd814a8/attachment.htm>


More information about the rails-dev mailing list