Skip to content

Commit

Permalink
Fixed spec error. The reason was that there were two records with sam…
Browse files Browse the repository at this point in the history
…e impressions_count, so in this case we need to additionally sort records by id, to match TextAPI behaviour
  • Loading branch information
damisul committed Nov 26, 2024
1 parent aa7dc14 commit e3e88b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/api/v1/text_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e3e88b3

Please sign in to comment.