3889: break the "add keep disk with no filesystem_uuid" test into two tests, instead...
[arvados.git] / services / api / test / functional / arvados / v1 / keep_disks_controller_test.rb
index a41531afe58d843c8024d1ce25843f59d625d409..ea7b5b765a9ba25a26e0ec5899b6f8d0640492dc 100644 (file)
@@ -16,18 +16,16 @@ class Arvados::V1::KeepDisksControllerTest < ActionController::TestCase
     assert_not_equal '', new_keep_disk['ping_secret']
   end
 
-  test "add keep disk with no filesystem_uuid" do
-    authorize_with :admin
-    opts = {
-      ping_secret: '',
-    }
-    post :ping, opts
-    assert_response :success
-    assert_not_nil JSON.parse(@response.body)['uuid']
-
-    post :ping, opts.merge(filesystem_uuid: '')
-    assert_response :success
-    assert_not_nil JSON.parse(@response.body)['uuid']
+  [
+    {ping_secret: ''},
+    {ping_secret: '', filesystem_uuid: ''},
+  ].each do |opts|
+    test "add keep disk with no filesystem_uuid #{opts}" do
+      authorize_with :admin
+      post :ping, opts
+      assert_response :success
+      assert_not_nil JSON.parse(@response.body)['uuid']
+    end
   end
 
   test "refuse to add keep disk without admin token" do