about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-04-22 06:37:07 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-04-21 23:37:07 +0200
commit3f6893c6419c842f32dc0727db8d46dd8e457777 (patch)
tree17cc41feeae4a85d85b0a6f5a9cb193f3e54649c /spec
parent9b8bb2a5df2839041ccd33e4ae7ec81b8746ddb2 (diff)
Reset locale on registration tests (#7219)
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/auth/registrations_controller_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/auth/registrations_controller_spec.rb b/spec/controllers/auth/registrations_controller_spec.rb
index 9cfbd481f..eeb01d5ad 100644
--- a/spec/controllers/auth/registrations_controller_spec.rb
+++ b/spec/controllers/auth/registrations_controller_spec.rb
@@ -73,6 +73,12 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
   describe 'POST #create' do
     let(:accept_language) { Rails.application.config.i18n.available_locales.sample.to_s }
 
+    around do |example|
+      current_locale = I18n.locale
+      example.run
+      I18n.locale = current_locale
+    end
+
     before { request.env["devise.mapping"] = Devise.mappings[:user] }
 
     context do