-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #285 from timfsw/feature/translator_lookup
Add support for i18n lookup with the controller path instead of nested keys
- Loading branch information
Showing
6 changed files
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'test_helper' | ||
|
||
class I18nSlashSeparatorTest < ActionDispatch::IntegrationTest | ||
include RouteTranslator::ConfigurationHelper | ||
|
||
def teardown | ||
teardown_config | ||
end | ||
|
||
def test_deprecation_when_default | ||
assert_deprecated('i18n_use_slash_separator') do | ||
RouteTranslator.config | ||
end | ||
end | ||
|
||
def test_deprecation_when_false | ||
config_i18n_use_slash_separator false | ||
|
||
assert_deprecated('i18n_use_slash_separator') do | ||
RouteTranslator.config | ||
end | ||
end | ||
|
||
def test_no_deprecation_when_true | ||
config_i18n_use_slash_separator true | ||
|
||
assert_not_deprecated do | ||
RouteTranslator.config | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters