group_spec.rb 830 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'models/application_model_examples'
  4. require 'models/concerns/can_be_imported_examples'
  5. require 'models/concerns/has_object_manager_attributes_examples'
  6. require 'models/concerns/has_collection_update_examples'
  7. require 'models/concerns/has_xss_sanitized_note_examples'
  8. require 'models/concerns/has_image_sanitized_note_examples'
  9. RSpec.describe Group, type: :model do
  10. subject(:group) { create(:group) }
  11. it_behaves_like 'ApplicationModel'
  12. it_behaves_like 'CanBeImported'
  13. it_behaves_like 'HasObjectManagerAttributes'
  14. it_behaves_like 'HasCollectionUpdate', collection_factory: :group
  15. it_behaves_like 'HasXssSanitizedNote', model_factory: :group
  16. it_behaves_like 'HasImageSanitizedNote', model_factory: :group
  17. end