Use a regular expression for the test, since it can give one of two responses based...
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 11 May 2009 15:50:03 +0000 (15:50 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 11 May 2009 15:50:03 +0000 (15:50 +0000)
test/functional/node_controller_test.rb

index 3bebace8d692e1289c04cc4e0ead0afd8b701490..609a1767fc697bb9b3753857c28d6380cd3278f1 100644 (file)
@@ -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
 
   ##