[ARVADOS] updated: b3d9b57e9df6526bf90a3e03a8452ab66666936e

git at public.curoverse.com git at public.curoverse.com
Thu Apr 2 12:01:48 EDT 2015


Summary of changes:
 .../arvados/v1/repositories_controller_test.rb      | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

       via  b3d9b57e9df6526bf90a3e03a8452ab66666936e (commit)
      from  05fab15b6771960ab0b9350113f8c04c1ac0a58f (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 b3d9b57e9df6526bf90a3e03a8452ab66666936e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Apr 2 12:01:43 2015 -0400

    5626: Expand test to check both positive and negative cases a bit per request.

diff --git a/services/api/test/functional/arvados/v1/repositories_controller_test.rb b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
index 36d5c1d..fe5bb1c 100644
--- a/services/api/test/functional/arvados/v1/repositories_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/repositories_controller_test.rb
@@ -96,13 +96,20 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase
                     "git at git.zzzzz.arvadosapi.com:active/foo.git")
   end
 
-  test "setting git_host changes fetch_url" do
-    Rails.configuration.git_host = "example.com"
-    authorize_with :active
-    get(:index)
-    assert_response :success
-    assert_includes(json_response["items"].map { |r| r["fetch_url"] },
-                    "git at example.com:active/foo.git")
+  [
+    {config: "example.com", host: "example.com"},
+    {config: false, host: "git.zzzzz.arvadosapi.com"}
+  ].each do |set_git_host|
+    test "setting git_host to #{set_git_host[:host]} changes fetch/push_url to #{set_git_host[:config]}" do
+      Rails.configuration.git_host = set_git_host[:config]
+      authorize_with :active
+      get(:index)
+      assert_response :success
+      assert_includes(json_response["items"].map { |r| r["fetch_url"] },
+                      "git@#{set_git_host[:host]}:active/foo.git")
+      assert_includes(json_response["items"].map { |r| r["push_url"] },
+                      "git@#{set_git_host[:host]}:active/foo.git")
+    end
   end
 
   test "can select push_url in index" do

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list