mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
DEV: Disable SearchIndexer after fabrication (#21378)
SearchIndexer is only automatically disabled in `before_all` and `before` blocks which means at the start of test runs. Enabling the SearchIndexer in one `fab!` block will affect all other `fab!` blocks which is not ideal as we may be indexing stuff for search when we don't need to.
This commit is contained in:
@@ -653,8 +653,9 @@ RSpec.describe Topic do
|
||||
|
||||
context "with a similar topic" do
|
||||
fab!(:post) do
|
||||
SearchIndexer.enable
|
||||
create_post(title: "Evil trout is the dude who posted this topic")
|
||||
with_search_indexer_enabled do
|
||||
create_post(title: "Evil trout is the dude who posted this topic")
|
||||
end
|
||||
end
|
||||
|
||||
let(:topic) { post.topic }
|
||||
|
||||
Reference in New Issue
Block a user