issue4505_inconsistent_screen_view_active_attribute_spec.rb 651 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe Issue4505InconsistentScreenViewActiveAttribute, type: :db_migration do
  4. context 'when it has wrong active screen value', db_strategy: :reset do
  5. let(:attribute) { ObjectManager::Attribute.get(name: 'active', object: 'Organization') }
  6. before do
  7. attribute.screens[:view][:'ticket.agent'][:shown] = true
  8. attribute.save!
  9. end
  10. it 'does set the correct active screen value' do
  11. expect { migrate }.to change { attribute.reload.screens[:view][:'ticket.agent'][:shown] }.from(true).to(false)
  12. end
  13. end
  14. end