VirtualPS/2 VMware VMMouse
  3   ˆl–ß=¿J*i?u4 �p¸ÛJbÑ¿ŽþdÎ	×C
&Àð?ŸÄ‚ÃÂÁ  Ð    # Set the System Time from the Hardware Clock and set the kernel's timezone
# value to the local timezone when the kernel clock module is loaded.

KERNEL=="rtc0", RUN+="/usr/lib/udev/hwclock-set $root/$name"
  E   	ˆl–Ðz¾”ªC]Šq@=q¦®41hß�þF7¥YÆÀä‚ ¤\wùÅ„i—gÄ_�uÐb&=LyZËcõÄÃ ?÷     	# Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

RSpec.shared_examples 'Ticket::Escalation' do

  describe '#update_escalation_information callback' do

    context 'with standard incoming email with active SLA' do

      subject(:ticket) { create(:ticket, created_at: '2013-03-21 09:30:00 UTC', updated_at: '2013-03-21 09:30:00 UTC') }

      let(:calendar) do
        create(:calendar,
               business_hours: {
                 mon: {
                   active:     true,
                   timeframes: [ ['08:00', '18:00'] ]
                 },
                 tue: {
                   active:     true,
                   timeframes: [ ['08:00', '18:00'] ]
                 },
                 wed: {
                   active:     true,
                   timeframes: [ ['08:00', '18:00'] ]
                 },
                 thu: {
                   active:     true,
                   timeframes: [ ['08:00', '18:00'] ]
                 },
                 fri: {
                   active:     true,
                   timeframes: [ ['08:00', '18:00'] ]
                 },
                 sat: {
                   active:     false,
                   timeframes: [ ['08:00', '17:00'] ]
                 },
                 sun: {
                   active:     false,
                   timeframes: [ ['08:00', '17:00'] ]
                 },
               })
      end
      let(:sla)     { create(:sla, calendar: calendar, first_response_time: 60, response_time: 120, solution_time: 180) }
      let(:article) { create(:'ticket/article', :inbound_email, ticket: ticket, created_at: '2013-03-21 09:30:00 UTC', updated_at: '2013-03-21 09:30:00 UTC') }

      before do
        sla
        ticket
        article
        ticket.reload
      end

      it 'calculates escalation_at attributes' do
        expect(ticket.escalation_at.gmtime.to_s).to eq('2013-03-21 10:30:00 UTC')
        expect(ticket.first_response_escalation_at.gmtime.to_s).to eq('2013-03-21 10:30:00 UTC')
        expect(ticket.first_response_at).to be_nil
        expect(ticket.first_response_in_min).to be_nil
        expect(ticket.first_response_diff_in_min).to be_nil

        expect(ticket.update_escalation_at.gmtime.to_s).to eq('2013-03-21 11:30:00 UTC')
        expect(ticket.update_in_min).to be_nil
        expect(ticket.update_diff_in_min).to be_nil

        expect(ticket.close_escalation_at.gmtime.to_s).to eq('2013-03-21 12:30:00 UTC')
        expect(ticket.close_in_min).to be_nil
        expect(ticket.close_diff_in_min).to be_nil
      end

      context 'with first response time resolved by answer + state pending reminder' do
        before do
          ticket.update(state: Ticket::State.find_by(name: 'pending reminder'))
          create(:'ticket/article', :outbound_email, ticket: ticket, created_at: '2013-03-21 09:45:00 UTC', updated_at: '2013-03-21 09:45:00 UTC')
        end

        it 'does set first_response_diff_in_min' do
          expect(ticket.reload.first_response_diff_in_min).to eq(45)
        end
      end

      context 'with first response in time' do

        before do
          ticket.update!(
            first_response_at: '2013-03-21 10:00:00 UTC',
          )
          ticket.reload
        end

        it 'calculates escalation_at attributes' do
          expect(ticket.escalation_at.gmtime.to_s).to eq('2013-03-21 11:30:00 UTC')
          expect(ticket.first_response_escalation_at).to be_nil
          expect(ticket.first_response_at.gmtime.to_s).to eq('2013-03-21 10:00:00 UTC')
          expect(ticket.first_response_in_min).to eq(30)
          expect(ticket.first_response_diff_in_min).to eq(30)

          expect(ticket.upda