mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
fix test Subscriptions::CreateAsAdminTest
user_id must be read from [:cart_items][:customer_id]
This commit is contained in:
parent
4c605a8324
commit
e75259734c
@ -84,7 +84,7 @@ class API::PaymentsController < API::ApiController
|
|||||||
def on_subscription_success(gateway_item_id, gateway_item_type, details)
|
def on_subscription_success(gateway_item_id, gateway_item_type, details)
|
||||||
@subscription = Subscription.new(subscription_params)
|
@subscription = Subscription.new(subscription_params)
|
||||||
user_id = if current_user.admin? || current_user.manager?
|
user_id = if current_user.admin? || current_user.manager?
|
||||||
params[:cart_items][:subscription][:user_id]
|
params[:cart_items][:customer_id]
|
||||||
else
|
else
|
||||||
current_user.id
|
current_user.id
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user