<blockquote>
<p>Then again maybe it's good that we don't have the slightly circular situation where we are using the models to test themselves?</p>
</blockquote>
<p>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 (<a href="https://github.com/openstreetmap/openstreetmap-website/blob/94b59f440321846760d430fee378f05a6a2803ee/test/controllers/api/changesets_controller_test.rb#L533-L556">example</a>) or via a fixture (e.g. <a href="https://github.com/openstreetmap/openstreetmap-website/blob/master/test/gpx/fixtures/a.gpx">like traces</a>) or via helper methods (like this PR) - I'm not quite sure which is most preferable.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2164#issuecomment-468590544">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLV5elRHj19w5G4xx2PHZs_wpXDdVks5vSOmhgaJpZM4bYBli">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLdeiQfLPyactgXQEWop2HsXV0sxeks5vSOmhgaJpZM4bYBli.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"PERSON","message":"@gravitystorm in #2164: \u003e Then again maybe it's good that we don't have the slightly circular situation where we are using the models to test themselves?\r\n\r\nYeah, 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."}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/2164#issuecomment-468590544"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2164#issuecomment-468590544",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2164#issuecomment-468590544",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>