Update the way we create form builders in tests
We were getting a warning in Rails 6: DEPRECATION WARNING: ActionView::Base instances should be constructed with a lookup context, assignments, and a controller.
This commit is contained in:
@@ -2,7 +2,7 @@ require "rails_helper"
|
|||||||
|
|
||||||
describe SDG::RelatedListSelectorComponent do
|
describe SDG::RelatedListSelectorComponent do
|
||||||
let(:debate) { create(:debate) }
|
let(:debate) { create(:debate) }
|
||||||
let(:form) { ConsulFormBuilder.new(:debate, debate, ActionView::Base.new, {}) }
|
let(:form) { ConsulFormBuilder.new(:debate, debate, ApplicationController.new.view_context, {}) }
|
||||||
let(:component) { SDG::RelatedListSelectorComponent.new(form) }
|
let(:component) { SDG::RelatedListSelectorComponent.new(form) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ describe ConsulFormBuilder do
|
|||||||
stub_const("DummyModel::OPTIONS", %w[Good Bad Ugly].freeze)
|
stub_const("DummyModel::OPTIONS", %w[Good Bad Ugly].freeze)
|
||||||
end
|
end
|
||||||
|
|
||||||
let(:builder) { ConsulFormBuilder.new(:dummy, DummyModel.new, ActionView::Base.new, {}) }
|
let(:builder) { ConsulFormBuilder.new(:dummy, DummyModel.new, ApplicationController.new.view_context, {}) }
|
||||||
|
|
||||||
describe "hints" do
|
describe "hints" do
|
||||||
it "does not generate hints by default" do
|
it "does not generate hints by default" do
|
||||||
|
|||||||
Reference in New Issue
Block a user