mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 07:30:16 +08:00
DEV: Fix state leak in test causing flaky tests (#26282)
Why this change? The test registers a category custom field to preload but doesn't remove it at the end of the test causing a state leak which can result in other tests failing.
This commit is contained in:
parent
ef2a9da8e7
commit
4c667f16c7
|
@ -1166,6 +1166,8 @@ RSpec.describe CategoriesController do
|
|||
|
||||
expect(response.parsed_body["categories"].length).to eq(1)
|
||||
expect(response.parsed_body["categories"][0]["custom_fields"]).to eq("bob" => "marley")
|
||||
ensure
|
||||
Site.reset_preloaded_category_custom_fields
|
||||
end
|
||||
|
||||
context "without include_ancestors" do
|
||||
|
|
Loading…
Reference in New Issue
Block a user