mirror of
https://github.com/discourse/discourse.git
synced 2024-12-05 09:13:43 +08:00
18 lines
388 B
Ruby
18 lines
388 B
Ruby
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
|