Sha256: 9e5f1259fabce51daf8399158c965b105a10e02e734600bbd19aa9346c829ae5

Contents?: true

Size: 776 Bytes

Versions: 13

Compression:

Stored size: 776 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: }
    let(:component) { create(:component, participatory_space: participatory_process) }
    let(:commentable) { create(:dummy_resource, component:) }
    let(:comment) { create :comment, body:, 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

13 entries across 13 versions & 1 rubygems

Version Path
decidim-comments-0.29.1 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.4 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.29.0 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.3 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.29.0.rc4 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.29.0.rc3 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.29.0.rc2 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.29.0.rc1 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.2 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.1 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.0 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.0.rc5 lib/decidim/comments/test/shared_examples/translatable_comment.rb
decidim-comments-0.28.0.rc4 lib/decidim/comments/test/shared_examples/translatable_comment.rb