ruby on rails - Submitting form in capybara -
i have form i'm testing capybara. once have spec fill in fields in form, have hit submit button. on submit, i'm getting error says following:
failure/error: click_button 'submit contact information' actionview::template::error: no route matches {:action=>"create", :controller=>"information_forms", :lender_id=>"2293"} missing required keys: []
the form code looks following:
<%= form_for @lenderinformationform, url: lender_lender_information_form_path(@user) |f| %> <%= f.submit "submit contact information", 'data-disable-with' => "please wait..", :class => "btn-u btn-u btn-block margin-bottom-20", :type => "submit", :id => "skyformbutton" %> <% end %>
the spec:
before :each user = factorygirl.create(:lender, :email => "1234@gmail.com") login_as(user) end "completes lender information form" click_button 'submit contact information' end
i can complete form in browser when manually, there seems issue submit button in capybara spec.
Comments
Post a Comment