<p dir="auto">This PR reworks some model tests to use factories, instead of creating new objects. This tends to simplify the tests, since there's often less boilerplate in setting up the new object to be valid.</p>
<p dir="auto">It also reworks the "empty" tag tests, since it wasn't clear from the naming and code exactly what was being tested. So I've refactored these to show that they are testing that the parent object is set.</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/3518'>https://github.com/openstreetmap/openstreetmap-website/pull/3518</a></p>

<h4>Commit Summary</h4>
<ul>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/commits/374518f58ac5e598d669ffd4e7e3a945b68b877c" class="commit-link">374518f</a>  Rework 'empty' tag tests</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/commits/034db6820f622f2039c0423880ed1083cf57e3e5" class="commit-link">034db68</a>  Simplify changeset tag tests by using factories</li>
  <li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/commits/5c2cb9e96fdc00c7efd72ba4186308127e45855c" class="commit-link">5c2cb9e</a>  Use factories for tag uniqueness tests</li>
</ul>

<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files">7 files</a>)</p>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-f71810edf41ac520b7232a82bab9cd0ff5490e215a2bb9a3acd3a7094301ab57">test/models/changeset_tag_test.rb</a>
    (54)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-4dce7119318fc3034f2d72ffe84dc5fc634ae6fa13b2dabdf3640131bfc5eb98">test/models/node_tag_test.rb</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-763bafb88e258710a4e340f4fd1b34fd16dc4c3bc29972a817d591482e6fbd1b">test/models/old_node_tag_test.rb</a>
    (13)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-622b56f9eecc03fb430a353ff685f96951f19eb229d423a6b10374946df7cfac">test/models/old_relation_tag_test.rb</a>
    (13)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-869d958577af901fd1209c078ce87ee2407e6cb22910d8825ee07d48b98011ca">test/models/old_way_tag_test.rb</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-94144fb56994e0297e799d72d840cabaea97c3e915d53b396f18dc38f4b1a3d6">test/models/relation_tag_test.rb</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518/files#diff-ea4f9e44f635a4483449a074aef7654c9a5d8f58b48907cb2c8c69c5db850980">test/models/way_tag_test.rb</a>
    (9)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3518.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3518.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3518.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3518.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3518">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMOWB3PSGFLXQPWVA3VCR6PDANCNFSM5SCP4ZKA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLMP5ZMNQ3OSXNJFKTTVCR6PDA5CNFSM5SCP4ZKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4RV3XYIA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3518</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3518",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3518",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>