Skip to content

Commit 2aa8ed0

Browse files
committed
[API] Test Runner: Compare Time values coming from ES with String representation
1 parent b334752 commit 2aa8ed0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

elasticsearch-api/api-spec-testing/rspec_matchers.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def compare_hash(expected_pairs, actual_hash, test)
245245
unless compare_string(expected_value, actual_value, test, actual_hash)
246246
@mismatched_pairs.merge!(expected_key => expected_value)
247247
end
248+
when Time
249+
compare_string(expected_value.to_s, Time.new(actual_value).to_s, test, actual_hash)
248250
else
249251
unless expected_value == actual_value
250252
@mismatched_pairs.merge!(expected_key => expected_value)

0 commit comments

Comments
 (0)