DEV: Fix flaky test due to a lack of deterministic ordering (#20087)
This commit is contained in:
parent
6934edd97c
commit
c5c72a74b7
|
@ -63,10 +63,13 @@ class TagsController < ::ApplicationController
|
|||
unrestricted_tags = DiscourseTagging.filter_visible(tags.where(target_tag_id: nil), guardian)
|
||||
|
||||
categories =
|
||||
Category.where(
|
||||
Category
|
||||
.where(
|
||||
"id IN (SELECT category_id FROM category_tags WHERE category_id IN (?))",
|
||||
guardian.allowed_category_ids,
|
||||
).includes(:none_synonym_tags)
|
||||
)
|
||||
.includes(:none_synonym_tags)
|
||||
.order(:id)
|
||||
|
||||
category_tag_counts =
|
||||
categories
|
||||
|
|
|
@ -197,7 +197,7 @@ RSpec.describe TagsController do
|
|||
expect(categories[0]["tags"][0]["target_tag"]).to eq(nil)
|
||||
end
|
||||
|
||||
xit "does not result in N+1 queries when there are multiple categories configured with tags for an admin user" do
|
||||
it "does not result in N+1 queries when there are multiple categories configured with tags for an admin user" do
|
||||
category.update!(tags: [test_tag])
|
||||
|
||||
sign_in(admin)
|
||||
|
|
Loading…
Reference in New Issue