20300: Update symbols to strings in relations.
[arvados.git] / services / api / test / functional / arvados / v1 / collections_controller_test.rb
index 8a1d044d6a760fca9ec969114382eef77b71d2ef..574cd366fc3869c70af30ae5e8986cd52a1cc06d 100644 (file)
@@ -1222,6 +1222,20 @@ EOS
     assert_nil json_response['trash_at']
   end
 
+  test 'untrash a trashed collection by assigning nil to trash_at' do
+    authorize_with :active
+    post :update, params: {
+           id: collections(:expired_collection).uuid,
+           collection: {
+             trash_at: nil,
+           },
+           include_trash: true,
+    }
+    assert_response 200
+    assert_equal false, json_response['is_trashed']
+    assert_nil json_response['trash_at']
+  end
+
   test 'untrash error on not trashed collection' do
     authorize_with :active
     post :untrash, params: {