Sha256: aeb2ba44268e95ecd823b6016a0ad838cde8998417033a7455e75bf644ab7359

Contents?: true

Size: 1.44 KB

Versions: 18

Compression:

Stored size: 1.44 KB

Contents

# frozen_string_literal: true

shared_examples "amendment promoted event" do
  include_context "when a simple event"

  let(:resource) { emendation }
  let(:event_name) { "decidim.events.amendments.amendment_promoted" }

  it_behaves_like "a simple event"
  it_behaves_like "a simple event email"
  it_behaves_like "a simple event notification"

  let(:emendation_author_nickname) { "@#{emendation.creator_author.nickname}" }
  let(:emendation_path) { Decidim::ResourceLocatorPresenter.new(emendation).path }
  let(:emendation_author_path) { Decidim::UserPresenter.new(emendation.creator_author).profile_path }
  let(:amendable_path) { Decidim::ResourceLocatorPresenter.new(amendable).path }

  let(:email_subject) { "An amendment from #{emendation_author_nickname} has been published as a new proposal" }
  let(:email_intro) { "A rejected amendment for #{amendable_title} has been published as a new #{amendable_type}. You can see it from this page:" }
  let(:email_outro) { "You have received this notification because you are following #{amendable_title}. You can stop receiving notifications following the previous link." }
  # rubocop:disable Layout/LineLength
  let(:notification_title) { "A <a href=\"#{emendation_path}\">rejected amendment</a> for <a href=\"#{amendable_path}\">#{amendable_title}</a> has been published as a new #{amendable_type} by <a href=\"#{emendation_author_path}\">#{emendation_author_nickname}</a>." }
  # rubocop:enable Layout/LineLength
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
decidim-core-0.30.0.rc2 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.30.0.rc1 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.2 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.28.5 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.1 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.28.4 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.27.9 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.0 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.28.3 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.27.8 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.0.rc4 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.0.rc3 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.0.rc2 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.29.0.rc1 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.28.2 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.27.7 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.28.1 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb
decidim-core-0.27.6 lib/decidim/core/test/shared_examples/amendable/amendment_promoted_event_examples.rb