Skip to content

Commit

Permalink
Fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu committed May 6, 2024
1 parent 9590eb6 commit bf8a1ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -5,7 +5,7 @@
shared_examples "email with logo" do
context "when organization has a logo" do
let(:organization_logo) { Decidim::Dev.test_file("city.jpeg", "image/jpeg") }
let(:organization) { create(:organization, name: "O'Higgins", logo: organization_logo) }
let(:organization) { create(:organization, name: { en: "O'Higgins" }, logo: organization_logo) }
let(:mail) { described_class.event_received(event, event_class_name, resource, user, :follower, extra) }
let(:logo_path) { Rails.application.routes.url_helpers.rails_representation_path(organization.logo.variant(resize_to_fit: [600, 160]), only_path: true) }

Expand Down
6 changes: 5 additions & 1 deletion decidim-core/spec/mailers/reported_mailer_spec.rb
Expand Up @@ -14,7 +14,11 @@ module Decidim
let(:decidim) { Decidim::Core::Engine.routes.url_helpers }

before do
reportable.coauthorships.first.author.update!(name: "O'Higgins")
if reportable.coauthorships.first.author.is_a?(Decidim::Organization)
reportable.coauthorships.first.author.update!(name: { en: "O'Higgins" })
else
reportable.coauthorships.first.author.update!(name: "O'Higgins")
end
end

describe "#report" do
Expand Down

0 comments on commit bf8a1ee

Please sign in to comment.