Sha256: c24a39bc1e39ed5b90fe4976c18f4124abffa361ee357595d011d8182aec5e75
Contents?: true
Size: 1.03 KB
Versions: 46
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true RSpec.shared_context "when creating a comment" do let(:organization) { create(:organization) } let(:participatory_process) { create(:participatory_process, organization: organization) } let(:component) { create(:component, participatory_space: participatory_process) } let(:user) { create(:user, organization: organization) } let(:author) { create(:user, organization: organization) } let(:dummy_resource) { create :dummy_resource, component: component } let(:commentable) { dummy_resource } let(:body) { ::Faker::Lorem.paragraph } let(:alignment) { 1 } let(:user_group_id) { nil } let(:form_params) do { "comment" => { "body" => body, "alignment" => alignment, "user_group_id" => user_group_id, "commentable" => commentable } } end let(:form) do Decidim::Comments::CommentForm.from_params( form_params ).with_context( current_organization: organization ) end let(:command) { described_class.new(form, author) } end
Version data entries
46 entries across 46 versions & 1 rubygems