Skip to content

Commit

Permalink
Remove extra spec
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonasAapro committed Sep 4, 2024
1 parent 6ff6249 commit d955a20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
8 changes: 3 additions & 5 deletions app/cells/decidim/plans/author/flag.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<% if flaggable? %>
<button type="button" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" title="<%= t("report", scope: "decidim.plans.plans.show") %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="true" tabindex="0">
<%= icon "flag-line", aria_label: t("report", scope: "decidim.plans.plans.show"), class: "icon--small" %>
</button>
<% end %>
<button type="button" data-open="<%= current_user.present? ? "flagModal" : "loginModal" %>" title="<%= t("report", scope: "decidim.plans.plans.show") %>" aria-controls="<%= current_user.present? ? "flagModal" : "loginModal" %>" aria-haspopup="true" tabindex="0">
<%= icon "flag-line", aria_label: t("report", scope: "decidim.plans.plans.show"), class: "icon--small" %>
</button>
30 changes: 0 additions & 30 deletions spec/requests/plan_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,36 +222,6 @@
end
end

describe "related_to filter" do
let(:filter_params) { { related_to: } }

context "when filtering by related to resources" do
let(:related_to) { "Decidim::DummyResources::DummyResource".underscore }
let(:dummy_component) { create(:component, manifest_name: "dummy", participatory_space:) }
let(:dummy_resource) { create(:dummy_resource, component: dummy_component) }

let(:related_plan) { create(:plan, :accepted, component:) }
let(:related_plan2) { create(:plan, :accepted, component:) }
let(:other_plans) { create_list(:plan, 3, component:) }
let(:search_resources) do
other_plans

dummy_resource.link_resources([related_plan], "included_plans")
related_plan2.link_resources([dummy_resource], "included_plans")
end

it "returns only plans related to results" do
[related_plan, related_plan2].each do |pl|
expect(subject).to have_escaped_html(translated(pl.title))
end

other_plans.each do |pl|
expect(subject).not_to have_escaped_html(translated(pl.title))
end
end
end
end

describe "tags filter" do
let(:filter_params) { { with_any_tag: tags } }

Expand Down

0 comments on commit d955a20

Please sign in to comment.