resets_pending_time_seconds_examples.rb 402 B

123456789101112
  1. RSpec.shared_examples 'TicketResetsPendingTimeSeconds' do
  2. subject { create(described_class.name.underscore) }
  3. it 'can only be loaded for tickets' do
  4. expect(described_class).to eq Ticket
  5. end
  6. it 'resets pending_time seconds' do
  7. subject.update(pending_time: Time.zone.parse('2007-02-10 15:30:45'))
  8. expect(subject.pending_time).to eq(Time.zone.parse('2007-02-10 15:30:00'))
  9. end
  10. end