From 9aa37b32c3307dcb5896e1b768967666a6fdbf65 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 1 Mar 2021 04:59:13 +0100 Subject: Add `details` to error response for `POST /api/v1/accounts` in REST API (#15803) --- spec/controllers/auth/sessions_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/controllers/auth') diff --git a/spec/controllers/auth/sessions_controller_spec.rb b/spec/controllers/auth/sessions_controller_spec.rb index d3a9a11eb..d03ae51e8 100644 --- a/spec/controllers/auth/sessions_controller_spec.rb +++ b/spec/controllers/auth/sessions_controller_spec.rb @@ -69,7 +69,7 @@ RSpec.describe Auth::SessionsController, type: :controller do end it 'shows a login error' do - expect(flash[:alert]).to match I18n.t('devise.failure.invalid', authentication_keys: 'Email') + expect(flash[:alert]).to match I18n.t('devise.failure.invalid', authentication_keys: I18n.t('activerecord.attributes.user.email')) end it "doesn't log the user in" do @@ -136,7 +136,7 @@ RSpec.describe Auth::SessionsController, type: :controller do end it 'shows a login error' do - expect(flash[:alert]).to match I18n.t('devise.failure.invalid', authentication_keys: 'Email') + expect(flash[:alert]).to match I18n.t('devise.failure.invalid', authentication_keys: I18n.t('activerecord.attributes.user.email')) end it "doesn't log the user in" do -- cgit