my
describe PaymentController do
it 'should assign amount_to_pay' do
get bank_payment_path, {id: "1"}
expect(assigns[:amount_to_pay]).to eq "123"
end
end
my error:
Error: ActionController::RoutingError: No route matches {:action=>"bank", :controller=>"payment"}
and rake routes:
bank_payment GET /payment/:id/bank(.:format) payment#bank
What is wrong there?
该请求应为:
get :bank, id: "1"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.