From 792321dd098d6ba2c087d91703d8e503093cb827 Mon Sep 17 00:00:00 2001 From: moustachu Date: Fri, 3 Nov 2023 13:03:08 +0100 Subject: [PATCH] Fix tests i18n --- .../decidim/simple_proposal/proposals_controller_override.rb | 4 +++- .../decidim/proposals/proposals_controller_spec.rb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/decidim/simple_proposal/proposals_controller_override.rb b/app/controllers/concerns/decidim/simple_proposal/proposals_controller_override.rb index ae478df4..4915e9b2 100644 --- a/app/controllers/concerns/decidim/simple_proposal/proposals_controller_override.rb +++ b/app/controllers/concerns/decidim/simple_proposal/proposals_controller_override.rb @@ -24,7 +24,9 @@ def index .not_hidden @proposals = @base_query.includes(:component, :coauthorships) - @all_geocoded_proposals = @base_query.geocoded.where.not(latitude: Float::NAN, longitude: Float::NAN) + @all_geocoded_proposals = @base_query.geocoded + .where.not(latitude: Float::NAN) + .where.not(longitude: Float::NAN) @voted_proposals = if current_user ::Decidim::Proposals::ProposalVote.where( diff --git a/spec/controllers/decidim/proposals/proposals_controller_spec.rb b/spec/controllers/decidim/proposals/proposals_controller_spec.rb index f8bf57a7..faad774e 100644 --- a/spec/controllers/decidim/proposals/proposals_controller_spec.rb +++ b/spec/controllers/decidim/proposals/proposals_controller_spec.rb @@ -267,7 +267,7 @@ module Proposals it "is not able to withdraw the proposal" do put :withdraw, params: params.merge(id: proposal.id) - expect(flash[:alert]).to eq("This proposal can not be withdrawn because it already has supports.") + expect(flash[:alert]).to eq("This idea can not be withdrawn because it already has supports.") expect(response).to have_http_status(:found) proposal.reload expect(proposal.withdrawn?).to be false