【发布时间】:2018-10-02 12:09:17
【问题描述】:
我正在为我的项目编写一些测试并且遇到了一些问题。在测试中,我只是填写了一些字段,我想提交这个表格。它在浏览器中工作,但在测试中,我得到了formatError。这是错误:
ActionController::UnknownFormat: CompaniesController#update 缺少此请求格式和变体的模板。
request.formats: ["text/html"]
request.variant: []
小测试:
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
我还没有添加一些期望,因为它每次都失败了。
编辑:
是的,响应是js!它应该打开一个模式。
【问题讨论】:
标签: ruby-on-rails testing ruby-on-rails-5 capybara