Sha256: 6f9443bbecdfd34281950e7f1b8a0a7d2ef407a4984e0bb9472623d6aca31db6

Contents?: true

Size: 675 Bytes

Versions: 20

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

module Decidim
  module Comments
    describe CommentsHelper do
      let(:dummy_resource) { create(:dummy_resource) }

      describe "comments_for" do
        it "should render the react component `Comments` with the correct data" do
          expect(helper)
            .to receive(:react_comments_component)
            .with(
              "comments-for-DummyResource-1",
              commentableType: "Decidim::DummyResource",
              commentableId: "1",
              locale: I18n.locale
            ).and_call_original

          helper.comments_for(dummy_resource)
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
decidim-0.6.8 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.7 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.6 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.5 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.4 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.3 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.2 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.1 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.6.0 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.5.1 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.5.0 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.4.4 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.4.3 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.4.2 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.4.1 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.4.0 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.3.2 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.3.1 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.3.0 decidim-comments/spec/helpers/comments_helper_spec.rb
decidim-0.2.0 decidim-comments/spec/helpers/comments_helper_spec.rb