[ARVADOS] created: 9b3223e5cbcd1eb89193e8421d430025ddf791d1

git at public.curoverse.com git at public.curoverse.com
Thu Jul 30 14:53:05 EDT 2015


        at  9b3223e5cbcd1eb89193e8421d430025ddf791d1 (commit)


commit 9b3223e5cbcd1eb89193e8421d430025ddf791d1
Author: Manoj <jonam33 at gmail.com>
Date:   Thu Jul 30 14:51:18 2015 -0400

    6414: When viewing a public project, the text "Public Projects" now
    links to the main public projects page. Added a test to verify link
    is there.

diff --git a/apps/workbench/app/views/layouts/body.html.erb b/apps/workbench/app/views/layouts/body.html.erb
index 0f90c41..35c0fe3 100644
--- a/apps/workbench/app/views/layouts/body.html.erb
+++ b/apps/workbench/app/views/layouts/body.html.erb
@@ -226,7 +226,7 @@
         <nav class="navbar navbar-default breadcrumbs" role="navigation">
           <ul class="nav navbar-nav navbar-left">
             <li>
-                Public Projects  
+              <a href="/projects/public">Public Projects</a>
             </li>
             <% project_breadcrumbs.each do |p| %>
               <li class="nav-separator">
diff --git a/apps/workbench/test/controllers/projects_controller_test.rb b/apps/workbench/test/controllers/projects_controller_test.rb
index 13979df..51a4e37 100644
--- a/apps/workbench/test/controllers/projects_controller_test.rb
+++ b/apps/workbench/test/controllers/projects_controller_test.rb
@@ -397,4 +397,13 @@ class ProjectsControllerTest < ActionController::TestCase
       assert_includes @response.body, "All #{target}"
     end
   end
+
+  test "visit a public project and verify the public projects page link exists" do
+    Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
+    get :show, {id: api_fixture('groups')['anonymously_accessible_project']['uuid']}
+    project = assigns(:object)
+    refute_empty css_select("[href=\"/projects/#{project['uuid']}\"]")
+    assert_includes @response.body, "<a href=\"/projects/public\">Public Projects</a>"
+  end
+
 end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list