mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Fix spec
The controller now responds with a standard HTTP redirect, instead of an app-specific redirect encoded in the body.
This commit is contained in:
@@ -16,7 +16,7 @@ RSpec.describe Spree::UserSessionsController do
|
||||
spree_post :create, spree_user: { email: user.email, password: user.password }
|
||||
|
||||
expect(response).to have_http_status(:found)
|
||||
expect(response.body).to match(root_path).and match("redirect")
|
||||
expect(response.location).to eq root_url
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ RSpec.describe Spree::UserSessionsController do
|
||||
spree_post :create, spree_user: { email: user.email, password: user.password }
|
||||
|
||||
expect(response).to have_http_status(:found)
|
||||
expect(response.body).to match(checkout_path).and match("redirect")
|
||||
expect(response.location).to eq checkout_url
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user