Merge branch '20241-validate-ssh-keys'
[arvados.git] / apps / workbench / test / integration / user_settings_menu_test.rb
index 6a0e46e26aea5b6455fd400ac73d55596ab5895b..6f3ca9dd5c2b6281483d4987705c225e7702a408 100644 (file)
@@ -46,7 +46,7 @@ class UserSettingsMenuTest < ActionDispatch::IntegrationTest
 
         page.find_field('public_key').set 'first test with an incorrect ssh key value'
         click_button 'Submit'
-        assert_text 'Public key does not appear to be a valid ssh-rsa or dsa public key'
+        assert_text 'Public key does not appear to be valid'
 
         public_key_str = api_fixture('authorized_keys')['active']['public_key']
         page.find_field('public_key').set public_key_str
@@ -78,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'
@@ -89,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
@@ -188,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
 
   [