[ARVADOS] updated: ec27ba2a576189755d443d54213318741f73d125

git at public.curoverse.com git at public.curoverse.com
Tue Feb 3 08:35:36 EST 2015


Summary of changes:
 .../test/controllers/application_controller_test.rb        | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

       via  ec27ba2a576189755d443d54213318741f73d125 (commit)
      from  50ab35e7c81a9c1363da289bf76424d669bdf80c (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 ec27ba2a576189755d443d54213318741f73d125
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Tue Feb 3 08:33:29 2015 -0500

    2659: Expect redirect to login page when show method is executed in jobs controller etc when no anonymous configuration is set.
    Something is overriding the configured value from application.default.yml when the test is executed along with all other tests!

diff --git a/apps/workbench/test/controllers/application_controller_test.rb b/apps/workbench/test/controllers/application_controller_test.rb
index fe57630..463a131 100644
--- a/apps/workbench/test/controllers/application_controller_test.rb
+++ b/apps/workbench/test/controllers/application_controller_test.rb
@@ -337,11 +337,17 @@ class ApplicationControllerTest < ActionController::TestCase
       @controller = controller
 
       get(:show, {id: fixture['uuid']})
-      assert_response 200
-      if controller.class == JobsController
-        assert_includes @response.inspect, fixture['script']
+
+      if Rails.configuration.anonymous_user_token
+        assert_response 200
+        if controller.class == JobsController
+          assert_includes @response.inspect, fixture['script']
+        else
+          assert_includes @response.inspect, fixture['name']
+        end
       else
-        assert_includes @response.inspect, fixture['name']
+        assert_response :redirect
+        assert_match /\/users\/welcome/, @response.redirect_url
       end
     end
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list