Sha256: 8e6dc96b6e7726429d898681a8ef3b900101eea7d88e065385d56a400b297041

Contents?: true

Size: 816 Bytes

Versions: 12

Compression:

Stored size: 816 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

shared_examples_for "a translated comment event" do
  describe "translated notifications" do
    let(:en_body) { "This is Sparta!" }
    let(:body) { { en: en_body, machine_translations: { ca: "C'est Sparta!" } } }
    let(:participatory_process) { create :participatory_process, organization: organization }
    let(:component) { create(:component, participatory_space: participatory_process) }
    let(:commentable) { create(:dummy_resource, component: component) }
    let(:comment) { create :comment, body: body, commentable: commentable }
    let(:en_version) { "<div><p>#{comment.body["en"]}</p></div>" }
    let(:machine_translated) { "<div><p>#{comment.body["machine_translations"]["ca"]}</p></div>" }

    it_behaves_like "a translated event"
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
decidim-comments-0.27.9 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.8 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.7 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.6 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.5 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.4 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.3 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.2 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.1 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.0 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.0.rc2 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.27.0.rc1 lib/decidim/comments/test/shared_examples/translatable_comment.rb