online_notification_spec.rb 486 B

123456789101112131415161718
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. require 'models/application_model_examples'
  4. RSpec.describe OnlineNotification, type: :model do
  5. subject(:online_notification) { create(:online_notification, o: ticket) }
  6. let(:ticket) { create(:ticket) }
  7. it_behaves_like 'ApplicationModel'
  8. describe '#related_object' do
  9. it 'returns ticket' do
  10. expect(online_notification.related_object).to eq ticket
  11. end
  12. end
  13. end