From f334c2308e347165842c20bd088c3e9ac1248841 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 13 Jun 2013 21:15:52 +0200 Subject: [PATCH] Merge of newer test file. --- test/unit/ticket_test.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/unit/ticket_test.rb b/test/unit/ticket_test.rb index fdea49fba..e2fdd1887 100644 --- a/test/unit/ticket_test.rb +++ b/test/unit/ticket_test.rb @@ -633,9 +633,14 @@ class TicketTest < ActiveSupport::TestCase #) # set first response in time + ticket.update_attributes( + :last_contact_agent => '2013-06-04 10:30:00 UTC', + ) + ticket.update_attributes( :first_response => '2013-06-04 10:45:00 UTC', ) + # set ticket from 11:30 to closed History.history_create( :history_type => 'updated', @@ -677,8 +682,8 @@ class TicketTest < ActiveSupport::TestCase assert_equal( ticket.first_response_escal_date.gmtime.to_s, '2013-06-04 11:30:00 UTC', 'ticket.first_response_escal_date verify 1' ) assert_equal( ticket.first_response_in_min, 75, 'ticket.first_response_in_min verify 3' ) assert_equal( ticket.first_response_diff_in_min, 45, 'ticket.first_response_diff_in_min verify 3' ) - #assert_equal( ticket.update_time_escal_date.gmtime.to_s, '2013-06-04 12:30:00 UTC', 'ticket.update_time_escal_date verify 1' ) - #assert_equal( ticket.close_time_escal_date.gmtime.to_s, '2013-06-04 13:30:00 UTC', 'ticket.close_time_escal_date verify 1' ) + #assert_equal( ticket.update_time_escal_date.gmtime.to_s, '2013-06-04 13:45:00 UTC', 'ticket.update_time_escal_date verify 1' ) + assert_equal( ticket.close_time_escal_date.gmtime.to_s, '2013-06-04 13:30:00 UTC', 'ticket.close_time_escal_date verify 1' ) assert_equal( ticket.close_time_in_min, 150, 'ticket.close_time_in_min verify 3' ) assert_equal( ticket.close_time_diff_in_min, 90, 'ticket.close_time_diff_in_min# verify 3' ) delete = sla.destroy