mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-18 21:03:27 +00:00
Reset locale on registration tests (#7219)
This commit is contained in:
parent
9b8bb2a5df
commit
3f6893c641
|
@ -73,6 +73,12 @@ RSpec.describe Auth::RegistrationsController, type: :controller do
|
||||||
describe 'POST #create' do
|
describe 'POST #create' do
|
||||||
let(:accept_language) { Rails.application.config.i18n.available_locales.sample.to_s }
|
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] }
|
before { request.env["devise.mapping"] = Devise.mappings[:user] }
|
||||||
|
|
||||||
context do
|
context do
|
||||||
|
|
Loading…
Reference in a new issue