Skip to content

A platform for community discussion. Free, open, simple.

DEV: Order links by domain and url in spec

Penar Musarajced8cdad24e5
diff --git a/spec/serializers/user_summary_serializer_spec.rb b/spec/serializers/user_summary_serializer_spec.rb
index fdff682bbcd..56839af49a6 100644
--- a/spec/serializers/user_summary_serializer_spec.rb
+++ b/spec/serializers/user_summary_serializer_spec.rb
@@ -34,7 +34,7 @@ describe UserSummarySerializer do
topic = Fabricate(:topic)
post = Fabricate(:post_with_external_links, user: topic.user, topic: topic)
TopicLink.extract_from(post)
- TopicLink.where(topic_id: topic.id).order(domain: :asc).each_with_index do |link, index|
+ TopicLink.where(topic_id: topic.id).order(domain: :asc, url: :asc).each_with_index do |link, index|
index.times do |i|
TopicLinkClick.create(topic_link: link, ip_address: "192.168.1.#{i + 1}")
end