Roma Abrosimov
06/09/2023, 8:07 AMTimothy Jones
06/09/2023, 8:47 AMTimothy Jones
06/09/2023, 8:47 AMRoma Abrosimov
06/09/2023, 9:22 AMallow_any_instance_of(ActionController::Parameters).to receive(:[]).with(:variables).and_return({ "memberId" => member.id, "stateCd" => 'CT' })
but the problem is that I don't want to specify other params like "stateCd" because I want them to come from consumer side.
if I override only "memberId":
allow_any_instance_of(ActionController::Parameters).to receive(:[]).with(:variables).and_return({ "memberId" => member.id})
then I'll lost "stateCd"Timothy Jones
06/10/2023, 1:51 AMRoma Abrosimov
06/10/2023, 10:27 AMmember = Member.find_by(name: 'user0')
allow_any_instance_of(ActionController::Parameters).to receive(:[]).with(:variables).and_return({ "memberId" => member.id})
I don'w want to hardcode correct member_id on consumer side. It may work locally on my laptop but there is no guarantee that the same DB id will be on another instanceTimothy Jones
06/10/2023, 10:53 AMRoma Abrosimov
06/10/2023, 11:04 AMTimothy Jones
06/10/2023, 11:43 AMTimothy Jones
06/10/2023, 11:43 AM