]> git.openstreetmap.org Git - rails.git/commitdiff
Split api node show test
authorAnton Khorev <tony29@yandex.ru>
Sat, 1 Feb 2025 15:25:32 +0000 (18:25 +0300)
committerAnton Khorev <tony29@yandex.ru>
Wed, 5 Feb 2025 17:22:16 +0000 (20:22 +0300)
test/controllers/api/nodes_controller_test.rb

index 6ec9085600572c39cbf367cc1797a09e18b839e4..2317d6be6290b54ec91305a37d2c98f232b9f97b 100644 (file)
@@ -193,18 +193,19 @@ module Api
       assert_match(/ v: is too long \(maximum is 255 characters\) /, @response.body)
     end
 
-    def test_show
-      # check that a visible node is returned properly
-      get api_node_path(create(:node))
-      assert_response :success
+    def test_show_not_found
+      get api_node_path(0)
+      assert_response :not_found
+    end
 
-      # check that an deleted node is not returned
+    def test_show_deleted
       get api_node_path(create(:node, :deleted))
       assert_response :gone
+    end
 
-      # check chat a non-existent node is not returned
-      get api_node_path(0)
-      assert_response :not_found
+    def test_show
+      get api_node_path(create(:node))
+      assert_response :success
     end
 
     # Ensure the lat/lon is formatted as a decimal e.g. not 4.0e-05