2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2020-09-08 15:06:23 +00:00
|
|
|
RSpec.shared_examples 'HasTaskbars' do
|
|
|
|
subject { create(described_class.name.underscore) }
|
|
|
|
|
|
|
|
describe '#destroy_taskbars' do
|
|
|
|
it 'destroys related taskbars' do
|
|
|
|
taskbar = create(:taskbar, key: "#{described_class.name}-#{subject.id}")
|
|
|
|
subject.destroy
|
|
|
|
expect { taskbar.reload }.to raise_exception(ActiveRecord::RecordNotFound)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|