resets_pending_time_seconds_examples.rb 479 B

1234567891011121314
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. RSpec.shared_examples 'TicketResetsPendingTimeSeconds' do
  3. subject { create(described_class.name.underscore) }
  4. it 'can only be loaded for tickets' do
  5. expect(described_class).to eq Ticket
  6. end
  7. it 'resets pending_time seconds' do
  8. subject.update(pending_time: Time.zone.parse('2007-02-10 15:30:45'))
  9. expect(subject.pending_time).to eq(Time.zone.parse('2007-02-10 15:30:00'))
  10. end
  11. end