[openstreetmap/openstreetmap-website] Use factories instead of new objects (PR #3410)

Andy Allan notifications at github.com
Thu Jan 6 12:54:30 UTC 2022


This PR changes various uses of `Model.new` in the tests to use FactoryBot via `build(:model)`. It's partly for consistency, but also partly because I ran into problems with those User model tests while doing some unrelated work.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Use factorybot to build user objects
  * Use factory_bot to build new model objects

-- File Changes --

    M test/models/issue_test.rb (10)
    M test/models/message_test.rb (2)
    M test/models/node_test.rb (12)
    M test/models/relation_test.rb (14)
    M test/models/user_preference_test.rb (6)
    M test/models/user_test.rb (26)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list