diff --git a/spec/api/v1/text_api_spec.rb b/spec/api/v1/text_api_spec.rb index ca24ad8f..611288e1 100644 --- a/spec/api/v1/text_api_spec.rb +++ b/spec/api/v1/text_api_spec.rb @@ -265,7 +265,7 @@ m.expression.intellectual_property_public_domain? || m.expression.intellectual_property_unknown? end - expect(data_ids).to eq matched.sort_by(&:impressions_count).map(&:id)[0..24] + expect(data_ids).to eq matched.sort_by { |rec| [rec.impressions_count, rec.id] }.map(&:id)[0..24] end end