diff --git a/test/unit/ticket_escalation_test.rb b/test/unit/ticket_escalation_test.rb index 89045bb3c..f4f4ebc8a 100644 --- a/test/unit/ticket_escalation_test.rb +++ b/test/unit/ticket_escalation_test.rb @@ -115,7 +115,7 @@ class TicketEscalationTest < ActiveSupport::TestCase ticket.save! assert_not(ticket.has_changes_to_save?) assert(ticket.escalation_at) - assert_equal((ticket_escalation_at - 30.minutes).to_s, ticket.escalation_at.to_s) + assert_in_delta((ticket_escalation_at - 30.minutes).to_i, ticket.escalation_at.to_i, 90) sla.destroy! calendar.destroy! @@ -192,10 +192,10 @@ Some Text" ticket_p, article_p, user_p, mail = Channel::EmailParser.new.process({}, email) ticket_p.reload assert(ticket_p.escalation_at) - assert_in_delta(ticket_p.first_response_escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 120) - assert_in_delta(ticket_p.update_escalation_at.to_i, (ticket_p.created_at + 3.hours).to_i, 120) - assert_in_delta(ticket_p.close_escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 120) - assert_in_delta(ticket_p.escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 120) + assert_in_delta(ticket_p.first_response_escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 90) + assert_in_delta(ticket_p.update_escalation_at.to_i, (ticket_p.created_at + 3.hours).to_i, 90) + assert_in_delta(ticket_p.close_escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 90) + assert_in_delta(ticket_p.escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 90) travel 3.hours article = nil @@ -217,10 +217,10 @@ Some Text" end ticket_p.reload - assert_in_delta(ticket_p.first_response_escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 120) - assert_in_delta(ticket_p.update_escalation_at.to_i, (ticket_p.last_contact_agent_at + 3.hours).to_i, 120) - assert_in_delta(ticket_p.close_escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 120) - assert_in_delta(ticket_p.escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 120) + assert_in_delta(ticket_p.first_response_escalation_at.to_i, (ticket_p.created_at + 1.hour).to_i, 90) + assert_in_delta(ticket_p.update_escalation_at.to_i, (ticket_p.last_contact_agent_at + 3.hours).to_i, 90) + assert_in_delta(ticket_p.close_escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 90) + assert_in_delta(ticket_p.escalation_at.to_i, (ticket_p.created_at + 4.hours).to_i, 90) end end