[openstreetmap/openstreetmap-website] Refactor diary entry tests to use User factory (#1449)

Andy Allan notifications at github.com
Sun Feb 19 16:46:21 UTC 2017

This PR refactors the diary_entry tests to use the User factory instead of the fixtures. To simplify them I've created a "normal user" factory, which can log in without being redirected to view contributor terms etc.

I've tried to keep consistent naming for the tests, in most cases there are 'user' and 'other_user' objects replacing the 'normal_user' and 'public_user' fixtures.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Refactor diary entry tests to use User factory

-- File Changes --

    M test/controllers/diary_entry_controller_test.rb (255)
    M test/factories/user.rb (7)
    M test/models/diary_comment_test.rb (2)
    M test/models/diary_entry_test.rb (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170219/2499fc81/attachment.html>

More information about the rails-dev mailing list