feat(rc.1): refine with better translations, better design
This commit is contained in:
parent
3b78a9d81a
commit
d4c74b5621
6 changed files with 41 additions and 9 deletions
|
@ -14,7 +14,7 @@ describe Instructeurs::CommentairesController, type: :controller do
|
|||
end
|
||||
it 'flash success' do
|
||||
subject
|
||||
expect(flash[:notice]).to eq('Votre message a été supprimé')
|
||||
expect(flash[:notice]).to eq(I18n.t('views.shared.commentaires.destroy.notice'))
|
||||
end
|
||||
|
||||
context 'when it fails' do
|
||||
|
@ -27,7 +27,7 @@ describe Instructeurs::CommentairesController, type: :controller do
|
|||
end
|
||||
it 'flash success' do
|
||||
subject
|
||||
expect(flash[:alert]).to eq("Votre message ne peut être supprimé: #{error.error_message}")
|
||||
expect(flash[:alert]).to eq(I18n.t('views.shared.commentaires.destroy.alert', reason: error.error_message))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue