From 5eba8f55f3b0e033813005be5799357758f0ce8f Mon Sep 17 00:00:00 2001 From: quentinchampenois <26109239+Quentinchampenois@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:29:26 +0100 Subject: [PATCH] fix: Custom proposal states specs --- spec/services/decidim/proposals/proposal_serializer_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/services/decidim/proposals/proposal_serializer_spec.rb b/spec/services/decidim/proposals/proposal_serializer_spec.rb index f3871b4..076faea 100644 --- a/spec/services/decidim/proposals/proposal_serializer_spec.rb +++ b/spec/services/decidim/proposals/proposal_serializer_spec.rb @@ -9,11 +9,11 @@ module Proposals described_class.new(proposal) end - let!(:proposal) { create(:proposal, :accepted, component: proposals_component) } + let!(:proposal) { create(:proposal, :accepted, component: component) } let!(:category) { create(:category, participatory_space: component.participatory_space) } let!(:scope) { create(:scope, organization: component.participatory_space.organization) } let(:participatory_process) { component.participatory_space } - let(:component) { proposal.component } + let(:component) { create(:extended_proposal_component, manifest_name: "proposals") } let!(:meetings_component) { create(:component, manifest_name: "meetings", participatory_space: participatory_process) } let(:meetings) { create_list(:meeting, 2, component: meetings_component) } @@ -142,7 +142,7 @@ module Proposals end context "with proposal having an answer" do - let!(:proposal) { create(:proposal, :with_answer, component: proposals_component) } + let!(:proposal) { create(:proposal, :with_answer, component: component) } it "serializes the answer" do expect(serialized).to include(answer: expected_answer)