Skip to content

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

DEV: Fix a flaky id assertion in d-solved specs (#39802)

Jarek Radoszb42c5f8413ca
diff --git a/plugins/discourse-solved/spec/lib/post_mover_extension_spec.rb b/plugins/discourse-solved/spec/lib/post_mover_extension_spec.rb
index aa697e09ebb..47599d7694d 100644
--- a/plugins/discourse-solved/spec/lib/post_mover_extension_spec.rb
+++ b/plugins/discourse-solved/spec/lib/post_mover_extension_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe DiscourseSolved::PostMoverExtension do
fab!(:another_reply) { Fabricate(:post, topic: topic) }
fab!(:destination_topic) { Fabricate(:topic_with_op, category: category) }
- let!(:post_ids) { topic.posts.pluck(:id) }
+ let!(:post_ids) { topic.posts.order(:post_number).pluck(:id) }
let!(:solved) { Fabricate(:solved_topic, topic: topic, answer_post: reply) }
before { SiteSetting.allow_solved_on_all_topics = true }