mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-16 04:24:23 +00:00
Merge branch 'master' into 2-0-stable-jan-8th
This commit is contained in:
@@ -48,6 +48,16 @@ describe UserRegistrationsController, type: :controller do
|
||||
expect(json).to eq({"email" => "test@test.com"})
|
||||
expect(controller.spree_current_user).to be_nil
|
||||
end
|
||||
|
||||
it "sets user.locale from cookie on create" do
|
||||
original_locale_cookie = cookies[:locale]
|
||||
cookies[:locale] = "pt"
|
||||
|
||||
xhr :post, :create, spree_user: user_params, use_route: :spree
|
||||
|
||||
expect(assigns[:user].locale).to eq("pt")
|
||||
cookies[:locale] = original_locale_cookie
|
||||
end
|
||||
end
|
||||
|
||||
context "when registration fails" do
|
||||
|
||||
Reference in New Issue
Block a user