[openstreetmap/openstreetmap-website] Convert notes and note_comments tests to use factories (#1312)

Andy Allan notifications at github.com
Thu Oct 6 08:33:45 UTC 2016

This pull request converts the notes and note_comments test to use factories instead of fixtures.

There are a handful of occasions where the number of results in an assertion have changed, but this is just because e.g. two note comments are enough to test the functionality and creating additional comments is not testing anything different.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Add factories for notes and note_comments
  * Update note model tests to use factories.
  * Fix bugs->notes in comment
  * Update browse_controller_test to use note and note_comment factories.
  * Update site_controller_test to use note and note_comment factories.
  * Update notes_controller_test to use note and note_comment factories
  * Remove the note and note_comments fixtures

-- File Changes --

    M app/controllers/notes_controller.rb (2)
    M test/controllers/browse_controller_test.rb (23)
    M test/controllers/notes_controller_test.rb (256)
    M test/controllers/site_controller_test.rb (3)
    A test/factories/note_comments.rb (8)
    A test/factories/notes.rb (7)
    D test/fixtures/note_comments.yml (142)
    D test/fixtures/notes.yml (113)
    M test/models/note_comment_test.rb (10)
    M test/models/note_test.rb (32)
    M test/test_helper.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/20161006/f7414232/attachment.html>

More information about the rails-dev mailing list