Sha256: 76401ee9cd75b4c4b54ba49fc5d8ea2c014228602b752d963eee105c50f5dc7f
Contents?: true
Size: 900 Bytes
Versions: 16
Compression:
Stored size: 900 Bytes
Contents
# frozen_string_literal: true require "spec_helper" 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, 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) } it "includes organization logo" do expect(mail.body).to include(logo_path) end it "includes organization logo with full link" do expect(mail.body).to include("alt=\"#{organization.name}\"") expect(mail.body).to match(%r{https{0,1}://#{organization.host}:#{Capybara.server_port}#{logo_path}}) end end end
Version data entries
16 entries across 16 versions & 1 rubygems