[openstreetmap/openstreetmap-website] move changeset xml generation to view (#2164)

Andy Allan notifications at github.com
Fri Mar 1 08:49:37 UTC 2019


> Then again maybe it's good that we don't have the slightly circular situation where we are using the models to test themselves?

Yeah, I don't think the XML payloads sent to the API should be generated from the models, since as you say that becomes a bit circular. Whether the XML test payload should just be inline HEREDOC style ([example](https://github.com/openstreetmap/openstreetmap-website/blob/94b59f440321846760d430fee378f05a6a2803ee/test/controllers/api/changesets_controller_test.rb#L533-L556)) or via a fixture (e.g. [like traces](https://github.com/openstreetmap/openstreetmap-website/blob/master/test/gpx/fixtures/a.gpx)) or via helper methods (like this PR) - I'm not quite sure which is most preferable.

-- 
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/2164#issuecomment-468590544
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190301/376d44a0/attachment.html>


More information about the rails-dev mailing list