[openstreetmap/openstreetmap-website] Make factory-created revoked blocks inactive (PR #4604)

Anton Khorev notifications at github.com
Thu Mar 21 03:17:41 UTC 2024


While testing you can create a revoked block with `create(:user_block, :revoked)`. 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 `revoke!` method expires the block.

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.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4604

-- Commit Summary --

  * Make factory-created revoked blocks inactive

-- File Changes --

    M test/factories/user_blocks.rb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4604.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4604.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4604
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4604 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240320/83c146cc/attachment.htm>


More information about the rails-dev mailing list