Merge branch '19954-permission-dedup-doc'
[arvados.git] / apps / workbench / test / integration / user_settings_menu_test.rb
index b2cd39957ac30bc84a4584c2f599c12217fcbb6c..99076bbaf77731e815c6f0e3b660e05dd582766c 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 require 'integration_helper'
 
 class UserSettingsMenuTest < ActionDispatch::IntegrationTest
@@ -74,7 +78,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
 
   test "pipeline notification shown even though public pipelines exist" do
     skip "created_by doesn't work that way"
-    Rails.configuration.anonymous_user_token = api_fixture('api_client_authorizations')['anonymous']['api_token']
+    Rails.configuration.Users.AnonymousUserToken = api_fixture('api_client_authorizations')['anonymous']['api_token']
     visit page_with_token 'job_reader'
     click_link 'notifications-menu'
     assert_selector 'a', text: 'Click here to learn how to run an Arvados Crunch pipeline'
@@ -85,7 +89,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     ['active'],
   ].each do |user, *expect|
     test "user settings menu for #{user} with notifications #{expect.inspect}" do
-      Rails.configuration.anonymous_user_token = false
+      Rails.configuration.Users.AnonymousUserToken = ""
       visit page_with_token(user)
       click_link 'notifications-menu'
       if expect.include? :ssh
@@ -184,7 +188,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
     end
     assert_text ":active/workbenchtest.git"
     assert_match /git@git.*:active\/workbenchtest.git/, page.text
-    assert_match /https:\/\/git.*\/active\/workbenchtest.git/, page.text
+    assert_match /#{Rails.configuration.Services.GitHTTP.ExternalURL.to_s}active\/workbenchtest.git/, page.text
   end
 
   [