I have this, when i do rake routes
admin_pdf_templates GET /admin/pdf_templates(.:format) {:controller=>”admin/pdf_templates”, :action=>”show”}
PUT /admin/pdf_templates(.:format) {:controller=>”admin/pdf_templates”, :action=>”update”}
DELETE /admin/pdf_templates(.:format) {:controller=>”admin/pdf_templates”, :action=>”destroy”}
POST /admin/pdf_templates(.:format) {:controller=>”admin/pdf_templates”, :action=>”create”}
what will be be path for create action in paths.rb in cucumber.
My paths.rb is
when /create pdf/
admin_pdf_templates_path(:id => @user.id)
above path calls GET method . How do i call POST method in paths.rb in cucumber.
You’ll want to describe the steps the user will have to take in order make the post request rather than explicitly making it.
For example.
You would then define that When step
The click is what would trigger the post.
If there is no interface to test this interaction then perhaps you should not be using cucumber.
If you insist on making the post request without a user triggering it this topic looks similar.
How do you POST to a URL in Capybara?