diff options
author | Chad Pytel <chad@thoughtbot.com> | 2017-04-07 14:19:16 -0400 |
---|---|---|
committer | Chad Pytel <chad@thoughtbot.com> | 2017-04-07 14:23:18 -0400 |
commit | ad5ddd5e95062d0d5cd4bc56baff53698c598723 (patch) | |
tree | 4515ec60a05f2e8bf470b34bf035fb3eddf105b8 /spec/services | |
parent | 13c0077003288416b8cacd5d339f8796bc347f39 (diff) |
Use I18n for media attachment validation errors
These are currently user facing errors, but are not localized. This adds the ability for these messages to be localized.
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/post_status_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 3fe878f63..0e39cd969 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -141,7 +141,7 @@ RSpec.describe PostStatusService do ) end.to raise_error( Mastodon::ValidationError, - 'Cannot attach more than 4 files', + I18n.t('media_attachments.validations.too_many'), ) end @@ -160,7 +160,7 @@ RSpec.describe PostStatusService do ) end.to raise_error( Mastodon::ValidationError, - 'Cannot attach a video to a toot that already contains images', + I18n.t('media_attachments.validations.images_and_video'), ) end |