我的
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
我的错误:
Error: ActionController::RoutingError: No route matches {:action=>"bank", :controller=>"payment"}
和rake路线:
bank_payment GET /payment/:id/bank(.:format) payment#bank
那里有什么问题?
答案 0 :(得分:0)
请求应为:
get :bank, id: "1"