From 054a05333ff9d829d7137910a3e4b2b314bcfc31 Mon Sep 17 00:00:00 2001 From: quentinchampenois Date: Fri, 25 Aug 2023 15:57:47 +0200 Subject: [PATCH] ref: Remove deprecated announcement cell spec --- spec/cells/decidim/announcement_cell_spec.rb | 47 -------------------- 1 file changed, 47 deletions(-) delete mode 100644 spec/cells/decidim/announcement_cell_spec.rb diff --git a/spec/cells/decidim/announcement_cell_spec.rb b/spec/cells/decidim/announcement_cell_spec.rb deleted file mode 100644 index 2e3fc576..00000000 --- a/spec/cells/decidim/announcement_cell_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -require "spec_helper" - -module Decidim - describe AnnouncementCell, type: :cell do - controller Decidim::LastActivitiesController - - context "when passing a non-empty string" do - let(:announcement) { "My announcement" } - - it "renders the card" do - html = cell("decidim/announcement", announcement).call - expect(html).to have_css(".callout.announcement.cell-announcement") - expect(html).to have_text(announcement) - end - end - - context "when passing an empty string" do - let(:announcement) { "" } - - it "does not render the card" do - html = cell("decidim/announcement", announcement).call - expect(html).to render_nothing - end - end - - context "when passing an empty translations hash" do - let(:announcement) { { en: "" } } - - it "does not render the card" do - html = cell("decidim/announcement", announcement).call - expect(html).to render_nothing - end - end - - context "when passing a non-empty translations hash" do - let(:announcement) { { en: "My announcement", ca: "Translated value" } } - - it "renders the card" do - html = cell("decidim/announcement", announcement).call - expect(html).to have_css(".callout.announcement.cell-announcement") - expect(html).to have_text("My announcement") - end - end - end -end