mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
add activerecord tests for deprecation of %s and %d in error messages (and translations in general)
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
parent
79c8b104d6
commit
31dcd78111
1 changed files with 12 additions and 0 deletions
|
@ -40,6 +40,18 @@ class ActiveRecordValidationsI18nTests < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_percent_s_interpolation_syntax_in_error_messages_is_deprecated
|
||||
assert_deprecated('using %s in messages') do
|
||||
I18n.t :does_not_exist, :default => "%s interpolation syntax is deprected", :value => 'this'
|
||||
end
|
||||
end
|
||||
|
||||
def test_percent_d_interpolation_syntax_in_error_messages_is_deprecated
|
||||
assert_deprecated('using %d in messages') do
|
||||
I18n.t :does_not_exist, :default => "%d interpolation syntax is deprected", :count => 1
|
||||
end
|
||||
end
|
||||
|
||||
# ActiveRecord::Errors
|
||||
uses_mocha 'ActiveRecord::Errors' do
|
||||
|
||||
|
|
Loading…
Reference in a new issue