The Rails Port/Testing

From OpenStreetMap

Jump to: navigation, search

Rails has a full testing framework built in. Hopefully we can have enough tests that when run, will know whether the code has changed in a way that will cause a problem. This page aims to document the test cases. The tests are currently being added to the api06 branch.

Unit Tests

There should be a unit test for every model with a test case and fixture to check every edge case.

Model Number of Has Many Number of Model Validations Fixtures file name Number of fixtures Test file name Number of tests
changeset
changeset_tag
diary_comment
diary_entry
friend
message
node
node_tag
notifier
old_node.
old_node_tag
old_relation
old_relation_member
old_relation_tag
old_way
old_way_node
old_way_tag
relation
relation_member
relation_tag
session
trace
tracepoint
tracetag
user 8 11 users.yml 3 user_test.rb 3
user_preference 0 0 user_preferences.yml 2 user_preference_test.rb 2
user_token
way
way_node 0 0 way_nodes.yml 3
way_tag 0 0 way_tags.yml 3
Personal tools
recent changes