<p>The <code>.to_xml</code> and <code>.to_xml_node</code> methods are only used in the tests, for creating 'fixture'-style payloads, and aren't used by the application code. This PR moves those methods into the tests as helper methods.</p>
<p>It also changes the lat/lon formatting test, to test the rendered response from the controller. This should probably have been done when the output was refactored to use the xml builders, but I overlooked this during that review.</p>
<p>Followup work involves doing similar work for the other elements with .to_xml methods.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2433'>https://github.com/openstreetmap/openstreetmap-website/pull/2433</a></p>
<h4>Commit Summary</h4>
<ul>
<li>Move the format tests to test the output from the controller</li>
<li>Move Node.to_xml and to_xml_node out of model and into tests</li>
</ul>
<h4>File Changes</h4>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-0">app/models/node.rb</a>
(22)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-1">test/controllers/api/changesets_controller_test.rb</a>
(10)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-2">test/controllers/api/nodes_controller_test.rb</a>
(81)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-3">test/controllers/api/old_nodes_controller_test.rb</a>
(4)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-4">test/models/node_test.rb</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/2433/files#diff-5">test/test_helper.rb</a>
(26)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2433.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2433.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2433.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2433.diff</a></li>
</ul>
<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/2433?email_source=notifications&email_token=AAK2OLOI2MJBZ6YJQ2C5EO3QTQU37A5CNFSM4JM6D7OKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCI5XQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJXYOIX26VZ2456CHDQTQU37ANCNFSM4JM6D7OA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLNPR7YBTQK7UIPYKA3QTQU37A5CNFSM4JM6D7OKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCI5XQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2433?email_source=notifications\u0026email_token=AAK2OLOI2MJBZ6YJQ2C5EO3QTQU37A5CNFSM4JM6D7OKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCI5XQ",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2433?email_source=notifications\u0026email_token=AAK2OLOI2MJBZ6YJQ2C5EO3QTQU37A5CNFSM4JM6D7OKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HZCI5XQ",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>