]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/node_test.rb
Remove Open Graph og:image:secure_url property
[rails.git] / test / models / node_test.rb
index 664bfb2607a4a3aede197141ca73423ea191bfcc..94cb5ec8143612803a643912ac7445455651890a 100644 (file)
@@ -435,4 +435,13 @@ class NodeTest < ActiveSupport::TestCase
       node.update_from(new_node, user)
     end
   end
+
+  test "raises id precondition exception when deleting" do
+    user = create(:user)
+    node = Node.new(:id => 23, :visible => true)
+    new_node = Node.new(:id => 42, :visible => false)
+    assert_raises OSM::APIPreconditionFailedError do
+      node.delete_with_history!(new_node, user)
+    end
+  end
 end