[ARVADOS] created: 6e7c96b2bdf0498028bf6ee3902289e81ec1f2d7

git at public.curoverse.com git at public.curoverse.com
Thu Jul 2 14:16:20 EDT 2015


        at  6e7c96b2bdf0498028bf6ee3902289e81ec1f2d7 (commit)


commit 6e7c96b2bdf0498028bf6ee3902289e81ec1f2d7
Author: Manoj <jonam33 at gmail.com>
Date:   Thu Jul 2 13:55:45 2015 -0400

    6465: Moved the test "anonymous user accesses collection in shared project" from integration into controller tests.

diff --git a/apps/workbench/test/controllers/collections_controller_test.rb b/apps/workbench/test/controllers/collections_controller_test.rb
index b99ab95..dd9aefc 100644
--- a/apps/workbench/test/controllers/collections_controller_test.rb
+++ b/apps/workbench/test/controllers/collections_controller_test.rb
@@ -461,4 +461,15 @@ class CollectionsControllerTest < ActionController::TestCase
 
     assert_equal files.sort, disabled.sort, "Expected to see all collection files in disabled list of files"
   end
+
+  test "anonymous user accesses collection in shared project" do
+    Rails.configuration.anonymous_user_token =
+      api_fixture('api_client_authorizations')['anonymous']['api_token']
+    collection = api_fixture('collections')['public_text_file']
+    get(:show, {id: collection['uuid']})
+
+    response_object = assigns(:object)
+    assert_equal collection['name'], response_object['name']
+    assert_equal collection['uuid'], response_object['uuid']
+  end
 end
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 8ac3a56..7d3dfab 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -310,14 +310,4 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
       end
     end
   end
-
-  test "anonymous user accesses collection in shared project" do
-    visit "/collections/#{api_fixture('collections')['public_text_file']['uuid']}"
-
-    # in collection page
-    assert_text 'Public Projects Unrestricted public data'
-    assert_text 'Hello world'
-    assert_text 'Content address'
-    assert_selector 'a', text: 'Provenance graph'
-  end
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list