<p dir="auto">This PR changes various uses of <code>Model.new</code> in the tests to use FactoryBot via <code>build(:model)</code>. It's partly for consistency, but also partly because I ran into problems with those User model tests while doing some unrelated work.</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/3410'>https://github.com/openstreetmap/openstreetmap-website/pull/3410</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/commits/88cf03ff005474de5eaf0285c92a24017fe341cf" class="commit-link">88cf03f</a> Use factorybot to build user objects</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/commits/0100cfe304954c42305b58e7857fb9de81808267" class="commit-link">0100cfe</a> Use factory_bot to build new model objects</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files">6 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-7fbf0e6c10deff5d707995df2d2d9d1eced8fd6d9d23a1fac4818aae7e28bd2f">test/models/issue_test.rb</a>
(10)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-f6440fd3336b11c0501071041975ac6af9da2d69fbc0a209213bf226a8b4f560">test/models/message_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-fc4f9f9fac2300ac52e47916c83e6bc893b0cf37602253f876cb035d67850ea2">test/models/node_test.rb</a>
(12)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-f4f4607eb834bc83b509a1de9b73cedd7a01c205ce922f034c37841beab1007b">test/models/relation_test.rb</a>
(14)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-0f73892c02129f3d9cd2a2b5948ebd52c473f67eebfb7ac670071a7fa3320160">test/models/user_preference_test.rb</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/3410/files#diff-91bef9fda3c55514e23a4a8edba948f68aad59b57951adcff0b11e9ea9159854">test/models/user_test.rb</a>
(26)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3410.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/3410.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/3410.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/3410.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/3410">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJSBE2CGNVVHSJFUODUUWGINANCNFSM5LMISQLA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLNSROZ2GCM6LGMDU2LUUWGINA5CNFSM5LMISQLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4QKI3RRQ.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/3410</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/3410",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3410",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>