mardi 2 octobre 2018

Capybara Button JS Response ActionController Error

I'm still writing some tests for my project and got some problems aswell.

In the test i'm just filling some fields and want to submit this form. In the Browser it is working, but in the test, i got an formatError.

Here is the Error:
ActionController::UnknownFormat: CompaniesController#update is missing a template for this request format and variant.

request.formats: ["text/html"]
request.variant: []

The little test:

scenario 'update company with valid params' do
  visit company_account_information_path

  fill_in 'company_name', with: "Mustername für Firma"
  fill_in 'company_owner_name', with: "Mustermann"

  click_button "Speichern"
end

I didn't added some expectations yet because it is failing all the time.

EDIT:

Yes, the response is js! It should open a modal.

May you can help me!

Aucun commentaire:

Enregistrer un commentaire