class TestCommonGettext

Public Instance Methods

test_init_catalog() click to toggle source
# File vendor/qwik/lib/qwik/common-gettext.rb, line 38
def test_init_catalog
  res = session

  accept_languages = ['en']
  @action.init_catalog(@memory.catalog, accept_languages)
  ok_eq('hello', @action._('hello'))

  accept_languages = ['ja']
  @action.init_catalog(@memory.catalog, accept_languages)
  ok_eq('こんにちは', @action._('hello'))
end