[openstreetmap/openstreetmap-website] Remove fixtures (#1556)

Andy Allan notifications at github.com
Thu Jun 1 10:10:10 UTC 2017

This PR removes the test fixtures, and associated helper methods. It also fixes some tests that were implicitly relying on the test fixtures being in the database.
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * Refactor changeset tags model test to remove dependency on fixtures.
  * Use a user factory in order to log in.
  * Create a redaction object before testing the index page lists it.
  * Add ways into the database explicitly, rather than relying on preloaded fixtures.
  * Create nodes explicitly rather than relying on fixtures.
  * Rework the changeset feed tests.
  * Create objects via factories, rather than implicity relying on fixtures.
  * Only use changesets from factories for the test_query changeset controller tests.
  * Refactor the assert_changeset helper to take an array of changesets, instead of ids.
  * Use the user factory to generate login details.
  * Use factories to generate the relations
  * Refactor the user list test to use factory-built users and explicit assertions.
  * Update the user list pagination test to avoid counting users from fixtures.
  * Update amf_controller tests to use a factory-generated user for credentials.
  * create nodes from factories for the api changes test.
  * Rubocop fixes.
  * Remove the api_fixtures helper
  * Remove remaining references to fixtures.
  * Remove test fixtures.

-- File Changes --

    M .rubocop_todo.yml (2)
    M test/controllers/amf_controller_test.rb (25)
    M test/controllers/api_controller_test.rb (18)
    M test/controllers/browse_controller_test.rb (2)
    M test/controllers/changeset_controller_test.rb (120)
    M test/controllers/node_controller_test.rb (22)
    M test/controllers/old_node_controller_test.rb (2)
    M test/controllers/old_relation_controller_test.rb (2)
    M test/controllers/old_way_controller_test.rb (2)
    M test/controllers/redactions_controller_test.rb (4)
    M test/controllers/relation_controller_test.rb (20)
    M test/controllers/search_controller_test.rb (2)
    M test/controllers/site_controller_test.rb (2)
    M test/controllers/swf_controller_test.rb (2)
    M test/controllers/user_blocks_controller_test.rb (2)
    M test/controllers/user_controller_test.rb (30)
    M test/controllers/way_controller_test.rb (19)
    D test/fixtures/changesets.yml (84)
    D test/fixtures/current_nodes.yml (192)
    D test/fixtures/current_relation_members.yml (61)
    D test/fixtures/current_relations.yml (55)
    D test/fixtures/current_way_nodes.yml (44)
    D test/fixtures/current_ways.yml (48)
    D test/fixtures/nodes.yml (234)
    D test/fixtures/redactions.yml (7)
    D test/fixtures/relation_members.yml (103)
    D test/fixtures/relations.yml (99)
    D test/fixtures/user_roles.yml (26)
    D test/fixtures/users.yml (349)
    D test/fixtures/way_nodes.yml (161)
    D test/fixtures/ways.yml (99)
    M test/helpers/browse_helper_test.rb (2)
    M test/integration/client_applications_test.rb (28)
    M test/integration/user_diaries_test.rb (6)
    M test/models/changeset_comment_test.rb (2)
    M test/models/changeset_tag_test.rb (10)
    M test/models/friend_test.rb (6)
    M test/models/message_test.rb (2)
    M test/models/node_tag_test.rb (2)
    M test/models/node_test.rb (2)
    M test/models/note_comment_test.rb (2)
    M test/models/note_test.rb (2)
    M test/models/oauth_nonce_test.rb (2)
    M test/models/old_node_tag_test.rb (2)
    M test/models/old_relation_tag_test.rb (2)
    M test/models/old_relation_test.rb (2)
    M test/models/old_way_tag_test.rb (2)
    M test/models/old_way_test.rb (2)
    M test/models/relation_member_test.rb (5)
    M test/models/relation_tag_test.rb (2)
    M test/models/relation_test.rb (6)
    M test/models/request_token_test.rb (2)
    M test/models/user_test.rb (3)
    M test/models/way_node_test.rb (5)
    M test/models/way_tag_test.rb (2)
    M test/models/way_test.rb (8)
    M test/test_helper.rb (38)

-- 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/20170601/eb7dcae0/attachment-0001.html>

More information about the rails-dev mailing list