Merge branch '4759-timestamp-precision-TC' closes #4759
[arvados.git] / services / api / test / integration / collections_api_test.rb
index 6fba5f76945896b76b84960f11b56fbdd7471473..4251047cea6b74ece4d8e4b1473d554e59daeb7e 100644 (file)
@@ -279,18 +279,19 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
     signed_manifest = Collection.sign_manifest(". bad42fa702ae3ea7d888fef11b46f450+44 0:44:my_test_file.txt\n", api_token(:active))
     post "/arvados/v1/collections", {
       format: :json,
-      collection: {manifest_text: signed_manifest,
-                   properties: {'property_1' => 'value_1'}}.to_json,
+      collection: {manifest_text: signed_manifest}.to_json,
     }, auth(:active)
     assert_response 200
     assert_not_nil json_response['uuid']
-    assert_equal 'value_1', json_response['properties']['property_1']
+    assert_not_nil json_response['properties']
+    assert_empty json_response['properties']
 
-    # get it
-    get "/arvados/v1/collections/#{json_response['uuid']}", {
+    # update collection's description
+    put "/arvados/v1/collections/#{json_response['uuid']}", {
       format: :json,
+      collection: { properties: {'property_1' => 'value_1'} }
     }, auth(:active)
-    assert_response 200
+    assert_response :success
     assert_equal 'value_1', json_response['properties']['property_1']
   end
 end