Fix failing test by parsing timestamp correctly.
authorTom Clegg <tom@clinicalfuture.com>
Tue, 3 Dec 2013 23:19:22 +0000 (15:19 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Tue, 3 Dec 2013 23:19:22 +0000 (15:19 -0800)
services/api/test/functional/arvados/v1/jobs_controller_test.rb

index 4114b72d01908c58b1f061d69dfa13a3f418cca0..32961618b84433827b58d675c4cd104e5871da3c 100644 (file)
@@ -37,8 +37,9 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase
     assert_not_nil job['cancelled_at']
     assert_not_nil job['cancelled_by_user_uuid']
     assert_not_nil job['cancelled_by_client_uuid']
-    assert_equal(true, job['cancelled_at'] > 1.minute.ago,
-                 'bogus cancelled_at corrected by server')
+    assert_equal(true, Time.parse(job['cancelled_at']) > 1.minute.ago,
+                 'server should correct bogus cancelled_at ' +
+                 job['cancelled_at'])
     assert_equal(true,
                  File.exists?(Rails.configuration.crunch_refresh_trigger),
                  'trigger file should be created when job is cancelled')