issue_3627_outdated_urls_security_page_spec.rb 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe Issue3627OutdatedUrlsSecurityPage, type: :db_migration do
  4. context 'when having outadted url for google oauth2' do
  5. before do
  6. setting.preferences[:description_i18n][2] = 'https://console.developers.google.com/apis/credentials'
  7. setting.save!
  8. end
  9. let(:setting) { Setting.find_by(name: 'auth_google_oauth2') }
  10. it 'change url in preference description placeholder' do
  11. expect { migrate }.to change { setting.reload.preferences[:description_i18n][2] }.to('https://console.cloud.google.com/apis/credentials')
  12. end
  13. end
  14. context 'when having outadted url for microsoft office365' do
  15. before do
  16. setting.preferences[:description_i18n][2] = 'https://apps.dev.microsoft.com'
  17. setting.save!
  18. end
  19. let(:setting) { Setting.find_by(name: 'auth_microsoft_office365') }
  20. it 'change url in preference description placeholder' do
  21. expect { migrate }.to change { setting.reload.preferences[:description_i18n][2] }.to('https://portal.azure.com')
  22. end
  23. end
  24. end