list_examples.rb 479 B

12345678910111213141516171819
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. RSpec.shared_examples 'Taskbar::List' do
  3. let(:user) { create(:user) }
  4. describe '.list' do
  5. context 'with entity restriction' do
  6. before do
  7. create_list(:taskbar, 2, user:)
  8. create(:taskbar, user: user, callback: 'Unknown')
  9. end
  10. it 'check for correct count' do
  11. expect(Taskbar.list(user, restrict_entities: true).count).to be 2
  12. end
  13. end
  14. end
  15. end