fix: shopify and locale spec

This commit is contained in:
Vishnu Narayanan
2025-11-21 16:28:03 +05:30
parent 1b9673b272
commit d261dfd394
2 changed files with 8 additions and 11 deletions
+6 -7
View File
@@ -81,15 +81,14 @@ RSpec.describe 'SwitchLocale Concern', type: :controller do
end
describe '#switch_locale_using_account_locale' do
before do
routes.draw { get 'account_locale' => 'anonymous#account_locale' }
end
it 'sets locale from account' do
controller.instance_variable_set(:@current_account, account)
result = nil
controller.send(:switch_locale_using_account_locale) do
result = I18n.locale.to_s
end
expect(result).to eq('es')
get :account_locale
expect(response.body).to eq('es')
end
end
end