<p dir="auto">While testing you can create a revoked block with <code class="notranslate">create(:user_block, :revoked)</code>. However it's going to be active because its expiration date is not set. This can't happen when you normally use the osm website because block model's <code class="notranslate">revoke!</code> method expires the block.</p>
<p dir="auto">Here I make all factory-created revoked blocks also expired. And just in case I also set the creation date earlier than the expiration date.</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/4604'>https://github.com/openstreetmap/openstreetmap-website/pull/4604</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4604/commits/3a05667d45f63a4d61470f12e63180a0da64c15e" class="commit-link">3a05667</a> Make factory-created revoked blocks inactive</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4604/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4604/files#diff-b6c0b1af31522c030e07c403d8ca797f366f31cffac84e321df63bbc0febca13">test/factories/user_blocks.rb</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4604.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4604.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4604.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4604.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/4604">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIGSLWXMOHJ5XRFZPDYZJGNLAVCNFSM6AAAAABFAURD32VHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4TSMBSGM3TINQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLI2YXRTYRXBAAW6J7DYZJGNLA5CNFSM6AAAAABFAURD32WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIGETQQI.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/4604</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/4604",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4604",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>