[ARVADOS] updated: 7415bc3f7239b5c062e3876681265912d8150edd

Git user git at public.curoverse.com
Thu Jun 22 15:41:28 EDT 2017


Summary of changes:
 apps/workbench/app/models/collection.rb                    |  2 +-
 .../test/controllers/trash_items_controller_test.rb        | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 1 deletion(-)
 create mode 100644 apps/workbench/test/controllers/trash_items_controller_test.rb

       via  7415bc3f7239b5c062e3876681265912d8150edd (commit)
      from  303650fa703e0661a71ae44fbbfcc1f28f423196 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 7415bc3f7239b5c062e3876681265912d8150edd
Author: radhika <radhika at curoverse.com>
Date:   Thu Jun 22 15:40:40 2017 -0400

    11840: include ensure_unique_name parameter in untrash requests from workbench.
    
    Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>

diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb
index 305ea01..025c136 100644
--- a/apps/workbench/app/models/collection.rb
+++ b/apps/workbench/app/models/collection.rb
@@ -99,6 +99,6 @@ class Collection < ArvadosBase
   end
 
   def untrash
-    arvados_api_client.api(self.class, "/#{self.uuid}/untrash", {})
+    arvados_api_client.api(self.class, "/#{self.uuid}/untrash", {"ensure_unique_name" => true})
   end
 end
diff --git a/apps/workbench/test/controllers/trash_items_controller_test.rb b/apps/workbench/test/controllers/trash_items_controller_test.rb
new file mode 100644
index 0000000..c530ba9
--- /dev/null
+++ b/apps/workbench/test/controllers/trash_items_controller_test.rb
@@ -0,0 +1,14 @@
+require 'test_helper'
+
+class TrashItemsControllerTest < ActionController::TestCase
+  test "untrash collection with same name as another collection" do
+    collection = api_fixture('collections')['trashed_collection_to_test_name_conflict_on_untrash']
+    items = [collection['uuid']]
+    post :untrash_items, {
+      selection: items,
+      format: :js
+    }, session_for(:active)
+
+    assert_response :success
+  end
+end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list