object_manager_spec.rb 761 B

123456789101112131415161718192021
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe ObjectManager, aggregate_failures: true, type: :model do
  4. describe 'class methods' do
  5. describe 'list_objects' do
  6. it 'returns an array of objects' do
  7. expect(described_class.list_objects).to be_an(Array)
  8. expect(described_class.list_objects.sort).to match_array(%w[Group Organization User Ticket TicketArticle])
  9. end
  10. end
  11. describe 'list_frontend_objects' do
  12. it 'returns an array of objects' do
  13. expect(described_class.list_frontend_objects).to be_an(Array)
  14. expect(described_class.list_frontend_objects.sort).to match_array(%w[Group Organization User Ticket])
  15. end
  16. end
  17. end
  18. end