DEV: clean up potential locale leak

This is an attempt to fix the flaky:

```
 1) Jobs::Onceoff can run all once off jobs without errors
     Failure/Error: self.locale_no_cache = value

     I18n::InvalidLocale:
       :bar is not a valid locale
     # ./lib/freedom_patches/translate_accelerator.rb:193:in `locale='
     # ./app/jobs/onceoff/clean_up_user_export_topics.rb:7:in `block in execute_onceoff'
     # ./app/jobs/onceoff/clean_up_user_export_topics.rb:6:in `map'
     # ./app/jobs/onceoff/clean_up_user_export_topics.rb:6:in `execute_onceoff'
     # ./spec/integrity/onceoff_integrity_spec.rb:13:in `block (3 levels) in <main>'
     # ./spec/integrity/onceoff_integrity_spec.rb:12:in `each'
     # ./spec/integrity/onceoff_integrity_spec.rb:12:in `block (2 levels) in <main>'
```
This commit is contained in:
Sam Saffron 2019-06-03 12:42:19 +10:00
parent c1e7a1b292
commit ba3bc6b2fe
1 changed files with 1 additions and 0 deletions

View File

@ -50,6 +50,7 @@ describe LocaleSiteSetting do
after do
DiscoursePluginRegistry.reset!
LocaleSiteSetting.reset!
end
describe '.valid_value?' do