5626: Add test for git_hostname configuration option.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 2 Apr 2015 14:38:39 +0000 (10:38 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 2 Apr 2015 14:38:39 +0000 (10:38 -0400)
services/api/test/functional/arvados/v1/repositories_controller_test.rb

index 128e4909d6e46e42b6927b69754ae88fae59563e..36d5c1df7f3a9f880b92cb46c5a7fc04a0e2c2a7 100644 (file)
@@ -96,6 +96,15 @@ class Arvados::V1::RepositoriesControllerTest < ActionController::TestCase
                     "git@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@example.com:active/foo.git")
+  end
+
   test "can select push_url in index" do
     authorize_with :active
     get(:index, {select: ["uuid", "push_url"]})