[openstreetmap/openstreetmap-website] Refactor diary tests (#1285)

Andy Allan notifications at github.com
Wed Sep 14 13:15:28 UTC 2016


This PR refactors that diary entry and diary comment tests to remove the associated fixtures. 

Note that you may need to remove the fixtures from your test database, since there's nothing in the rails code that removes unnecessary fixtures after their definitions are deleted. Either reload the test database completely, or run "delete from" via psql for diary_entries and diary_comments.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Test DiaryComment body validation
  * Change the display_name of suspended user fixuture
  * Refactor tests to use factories instead of fixtures
  * Remove diary_entry and diary_comment fixtures, and refactor tests.

-- File Changes --

    M test/controllers/diary_entry_controller_test.rb (117)
    D test/fixtures/diary_comments.yml (35)
    D test/fixtures/diary_entries.yml (71)
    M test/fixtures/users.yml (2)
    M test/models/diary_comment_test.rb (7)

-- Patch Links --

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


More information about the rails-dev mailing list