From: Shaun McDonald Date: Mon, 11 May 2009 15:50:03 +0000 (+0000) Subject: Use a regular expression for the test, since it can give one of two responses based... X-Git-Tag: live~7432 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/c7f134943c1531acdb91ea21a34ea87f1985f80b?hp=43988beec3fd4da67b2cacad771ca339ef60a8ab Use a regular expression for the test, since it can give one of two responses based on the order in the db. --- diff --git a/test/functional/node_controller_test.rb b/test/functional/node_controller_test.rb index 3bebace8d..609a1767f 100644 --- a/test/functional/node_controller_test.rb +++ b/test/functional/node_controller_test.rb @@ -210,7 +210,7 @@ class NodeControllerTest < ActionController::TestCase delete :delete, :id => current_nodes(:node_used_by_relationship).id assert_response :precondition_failed, "shouldn't be able to delete a node used in a relation (#{@response.body})" - assert_equal "Precondition failed: Node 5 is still used by relation 3.", @response.body + assert_match /Precondition failed: Node 5 is still used by relation [13]./, @response.body end ##