has_taskbars_examples.rb 443 B

12345678910111213
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. RSpec.shared_examples 'HasTaskbars' do
  3. subject { create(described_class.name.underscore) }
  4. describe '#destroy_taskbars' do
  5. it 'destroys related taskbars' do
  6. taskbar = create(:taskbar, key: "#{described_class.name}-#{subject.id}")
  7. subject.destroy
  8. expect { taskbar.reload }.to raise_exception(ActiveRecord::RecordNotFound)
  9. end
  10. end
  11. end