[openstreetmap/openstreetmap-website] User factory associations for all factories (#1460)

Andy Allan notifications at github.com
Wed Feb 22 18:55:25 UTC 2017


We have a User factory now, might as well use it!

There were two tests that made assumptions about the user_id of objects generated by factories. For the `test_api_details` the assumption was that the message was sender was also user_id 1. I think the test is clearer by having two messages, since having a message sent to yourself is a bit curious.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * User factory associations for all factories.

-- File Changes --

    M test/controllers/user_controller_test.rb (1)
    M test/factories/changeset_comments.rb (3)
    M test/factories/diary_comments.rb (4)
    M test/factories/diary_entries.rb (3)
    M test/factories/friends.rb (5)
    M test/factories/messages.rb (7)
    M test/factories/traces.rb (3)
    M test/factories/user_blocks.rb (7)
    M test/factories/user_preferences.rb (3)
    M test/models/user_preference_test.rb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/1460.patch
https://github.com/openstreetmap/openstreetmap-website/pull/1460.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/1460
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170222/8e477f78/attachment.html>


More information about the rails-dev mailing list