issue_3618_google_calendar_url_https_spec.rb 762 B

123456789101112131415161718192021222324
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe Issue3618GoogleCalendarUrlHttps, db_strategy: :reset, type: :db_migration do
  4. let(:url) { 'http://www.google.com/calendar/ical/en.lithuanian%%23holiday%%40group.v.calendar.google.com/public/basic.ics' }
  5. let(:calendar) { create(:calendar, ical_url: url) }
  6. it 'migrates Google Calendar URLs' do
  7. expect { migrate }
  8. .to change { calendar.reload.ical_url.starts_with? 'https://' }
  9. .from(false)
  10. .to(true)
  11. end
  12. it 'other' do
  13. calendar.update_attribute(:business_hours, nil)
  14. expect { migrate }
  15. .to change { calendar.reload.ical_url.starts_with? 'https://' }
  16. .from(false)
  17. .to(true)
  18. end
  19. end