Rails升级至6.1.4.6活动记录异常



升级轨道后"6.1.3.1">";6.1.4.6">我开始在一个项目的不同地方收到很多相同类型的错误(777个测试有错误(。无法获取错误跟踪。错误总是一样的:

ArgumentError: wrong number of arguments (given 0, expected 1)

Backend::TasksControllerTest::IndexFilterTest#test_#index_can_filter_on_lead_status:
ArgumentError: wrong number of arguments (given 0, expected 1)
app/models/campaign.rb:133:in `update_schedules'
test/controllers/backend/tasks_controller_test.rb:137:in `block in <class:IndexFilterTest>'
725) Error:
DeleteModelImportJobTest#test_removes_model_import_and_all_associated_rows:
ArgumentError: wrong number of arguments (given 0, expected 1)
app/models/office/model_import/row.rb:15:in `remove_imported_object'
app/jobs/delete_model_import_job.rb:6:in `block in perform'
app/jobs/delete_model_import_job.rb:5:in `perform'
test/jobs/delete_model_import_job_test.rb:11:in `block (2 levels) in <class:DeleteModelImportJobTest>'
test/jobs/delete_model_import_job_test.rb:10:in `block in <class:DeleteModelImportJobTest>'
726) Error:
Backend::Leads::CampaignLeadsControllerTest#test_new_includes_users_from_ponds_as_well_as_team_for_selection:
ArgumentError: wrong number of arguments (given 0, expected 1)
test/controllers/backend/leads/campaign_leads_controller_test.rb:5:in `block in <class:CampaignLeadsControllerTest>'
727) Error:
Backend::Leads::CampaignLeadsControllerTest#test_new_determines_users_without_firepoint_phone_numbers:
ArgumentError: wrong number of arguments (given 0, expected 1)
test/controllers/backend/leads/campaign_leads_controller_test.rb:5:in `block in <class:CampaignLeadsControllerTest>'

错误屏幕截图

我试图调试最小型的测试,似乎所有这些都与引发错误的ActiveRecord方法有关:delete_all!,删除,更新所有,更新!交易等(见屏幕截图(

更新!错误屏幕截图

delete_all错误截图

交易错误屏幕截图

不知道下一步该往哪里走,也不知道如何解决,我们非常感谢您对如何前进和在哪里寻找的任何想法。

我遇到了同样的异常,我发现范围定义为scope :id, (id) -> { where(id: id }我已经删除了作用域并编辑了我的代码,所以一切都很好

相关内容

  • 没有找到相关文章

最新更新