<p dir="auto">It's annoying to type</p>
<pre class="notranslate"><code class="notranslate">create(:oauth_access_token, :resource_owner_id => user.id, ...
</code></pre>
<p dir="auto">This PR shortens it to</p>
<pre class="notranslate"><code class="notranslate">create(:oauth_access_grant, :user => user, ...
</code></pre>
<p dir="auto">Doorkeper classes don't have actual associations with our models and looks like this line in <code class="notranslate">oauth_access_grant</code> factory never worked</p>
<pre class="notranslate"><code class="notranslate">resource_owner_id :factory => :user
</code></pre>
<p dir="auto">And I also have to tell RuboCop not to enforce these associations.</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/5541'>https://github.com/openstreetmap/openstreetmap-website/pull/5541</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/commits/ef648a53bab7620021c2cc371caf105a1a6a6bcc" class="commit-link">ef648a5</a> Add user transient attribute to oauth_access_token factory</li>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/commits/54c2787e87dcd5650c374ee31e07573f41a345ec" class="commit-link">54c2787</a> Add user transient attribute to oauth_access_grant factory</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files">7 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-1e09c84f0346635096fcf0cce0535d86117e03a6b21e1d033eb28b8967f0d6a2">test/abilities/api_abilities_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-86f561066896ab4c4f2fd512c55cc748080ab2e25de3690f85799488afab194f">test/abilities/api_capability_test.rb</a>
(8)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-6eea82cf3b878886809267f80f845c4cc597dcc9eb973bc62d2343c6851e1289">test/controllers/oauth2_authorized_applications_controller_test.rb</a>
(24)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-1673f60d01ff1b1eaa3c70a6dae8c7c1b65f0a882523dab1ba3a428542d9729b">test/factories/oauth_access_grant.rb</a>
(7)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-e5e1e11dbef11fb955376608e3054f5d459844110ececfe525686092831aea1c">test/factories/oauth_access_token.rb</a>
(6)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-91bef9fda3c55514e23a4a8edba948f68aad59b57951adcff0b11e9ea9159854">test/models/user_test.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5541/files#diff-ba37813ca277c227a74a372479b7b05b7f3ff085d890ab708f80d62573efdb7a">test/test_helper.rb</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5541.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5541.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5541.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5541.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/5541">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJQXDA7JNWOYT4KGOT2MEBKTAVCNFSM6AAAAABVXSZ6SKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAYDOMJXGE4TQMY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPNFUM33OPWLX53OH32MEBKTA5CNFSM6AAAAABVXSZ6SKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKOUQLR4.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/5541</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/5541",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5541",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>