File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ def rename
145145 render json : { status : 'success' , tag : @tag }
146146 else
147147 render json : { status : 'failed' ,
148- message : 'Failed to rename the tag.' ,
148+ message : I18n . t ( 'tags.errors.rename_generic' ) ,
149149 tag : @tag } ,
150150 status : :bad_request
151151 end
Original file line number Diff line number Diff line change 1+ en :
2+ tags :
3+ errors :
4+ rename_generic : >
5+ Failed to rename the tag.
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ class TagsControllerTest < ActionController::TestCase
207207 res_body = JSON . parse ( response . body )
208208
209209 assert_equal 'failed' , res_body [ 'status' ]
210- assert_no_nil res_body [ 'message' ]
210+ assert_equal I18n . t ( 'tags.errors.rename_generic' ) , res_body [ 'message' ]
211211 tag . reload
212212 assert_equal tag . name , old_tag_name
213213 end
You can’t perform that action at this time.
0 commit comments