Fixed unit tests and fixture loading for postgres. The foreign keys were playing havoc with the tests when only some fixtures were loaded.

This commit is contained in:
Matt Amos 2009-03-28 20:18:26 +00:00
parent be75a1504f
commit f492a1b709
26 changed files with 79 additions and 77 deletions

View file

@ -240,6 +240,20 @@ EOF
assert_equal false, Node.find(node.id).visible
end
def test_repeated_changeset_create
30.times do
basic_authorization "test@openstreetmap.org", "test"
# create a temporary changeset
content "<osm><changeset>" +
"<tag k='created_by' v='osm test suite checking changesets'/>" +
"</changeset></osm>"
put :create
assert_response :success
changeset_id = @response.body.to_i
end
end
##
# test that deleting stuff in a transaction doesn't bypass the checks
# to ensure that used elements are not deleted.