DEV: Catch missing translations during test runs (#26258)

This configuration makes it so that a missing translation will raise an error during test execution. Better discover there than after deploy.
This commit is contained in:
Ted Johansson
2024-05-24 22:15:53 +08:00
committed by GitHub
parent 9db83c37e4
commit 69205cb1e5
29 changed files with 219 additions and 76 deletions

View File

@ -330,6 +330,8 @@ RSpec.describe SiteSettingExtension do
describe "string setting with regex" do
it "Supports custom validation errors" do
I18n.backend.store_translations(:en, { oops: "oops" })
settings.setting(:test_str, "bob", regex: "hi", regex_error: "oops")
settings.refresh!