Skip to content

Commit 513ccc1

Browse files
committed
[MODEL] Validate that #first called on response records equals #[] with 0
1 parent 6e52a08 commit 513ccc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

elasticsearch-model/test/integration/active_record_basic_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def as_indexed_json(options = {})
111111
response = Article.search query: { match: { title: 'code' }}, sort: { clicks: :desc }
112112

113113
assert_equal response.records[0].clicks, 3
114+
assert_equal response.records[0], response.records.first
114115
assert_equal response.records[1].clicks, 2
115116

116117
response.records.each_with_hit do |r, h|

0 commit comments

Comments
 (0)