saml_ssl_verify_help_spec.rb 783 B

1234567891011121314151617181920212223
  1. # Copyright (C) 2012-2025 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe SamlSSLVerifyHelp, type: :db_migration do
  4. before do
  5. setting = Setting.find_by(name: 'auth_saml_credentials')
  6. setting.options[:form].each do |o|
  7. next if !o[:name].eql?('ssl_verify')
  8. o[:help] = 'Turning off SSL verification is a security risk and should be used only temporary. Use this option at your own risk!'
  9. end
  10. setting.save!
  11. end
  12. it 'updates the help text' do
  13. migrate
  14. expect(Setting.find_by(name: 'auth_saml_credentials').options[:form].find { |o| o[:name] == 'ssl_verify' }[:help]).to eq('Verification of the TLS connection to the IDP SSO target URL. Only relevant during setting up SAML authentication.')
  15. end
  16. end