mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
DEV: Fix flaky test (#28163)
Before this commit, running `rspec --seed 22953 --format documentation spec/requests/admin/site_texts_controller_spec.rb:191 spec/lib/freedom_patches/translate_accelerator_spec.rb:109` will fail. Setting `I18n.config.available_locales` is equivalent to hard coding the locales for the entire process. It should not be set so that `I18n` will fallback to `backend.locales`.
This commit is contained in:
parent
a47bcfc2f3
commit
f3ac2c9b5c
@ -211,8 +211,8 @@ RSpec.describe Admin::SiteTextsController do
|
|||||||
get "/admin/customize/site_texts.json", params: params
|
get "/admin/customize/site_texts.json", params: params
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
expect(response.parsed_body["site_texts"].size).to eq(0)
|
expect(response.parsed_body["site_texts"].size).to eq(0)
|
||||||
|
ensure
|
||||||
I18n.config.available_locales = available_locales
|
I18n.config.available_locales = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
context "with plural keys" do
|
context "with plural keys" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user