discourse/spec/components/freedom_patches/translate_accelerator_spec.rb

18 lines
388 B
Ruby
Raw Normal View History

require "rails_helper"
describe "translate accelerator" do
it "overrides for both string and symbol keys" do
key = "user.email.not_allowed"
text_overriden = "foobar"
expect(I18n.t(key)).to be_present
TranslationOverride.upsert!("en", key, text_overriden)
expect(I18n.t(key)).to eq(text_overriden)
expect(I18n.t(key.to_sym)).to eq(text_overriden)
end
end