[openstreetmap/openstreetmap-website] Use model relations when creating objects from factories (#1331)

Andy Allan notifications at github.com
Wed Oct 19 10:34:22 UTC 2016


Rather than passing around record ids explicitly, we can use the model relations and pass around the models. This makes reading the tests slightly simpler to read.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Use model relations when creating objects from factories

-- File Changes --

    M test/controllers/diary_entry_controller_test.rb (52)
    M test/controllers/notes_controller_test.rb (10)
    M test/controllers/user_controller_test.rb (2)
    M test/models/note_test.rb (2)
    M test/models/user_test.rb (4)

-- Patch Links --

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

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1331
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20161019/0ced809d/attachment.html>


More information about the rails-dev mailing list