[openstreetmap/openstreetmap-website] Problem with deny_access and request formats during tests (#2064)

Tom Hughes notifications at github.com
Wed Nov 14 19:08:56 UTC 2018

My immediate inclination is that the tests should be fixed - if a test is testing the API then it should request the kind of format a real API client would. That said, given these are controller tests, it's all a bit fake anyway.

Setting a default format is not a bad idea - the default format for our API is really XML and that is what we would likely want to send to a client that didn't request anything else anyway.

I think there's a better way than using `before_action` though, by attaching the default to the routes - we already do that for the notes routes and a few others.

Better separation of API and web site methods would of course also be good but I think that's a larger, and really separate, problem.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20181114/763a42f4/attachment.html>

More information about the rails-dev mailing list