Sha256: be0ba6d78bbd59dec9f9273489ef6f757315dc4a5112734ec943ec542fd03634
Contents?: true
Size: 1 KB
Versions: 29
Compression:
Stored size: 1 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 } } end let(:form) do Decidim::Comments::CommentForm.from_params( form_params ).with_context( current_organization: organization ) end let(:command) { described_class.new(form, author, commentable) } end
Version data entries
29 entries across 29 versions & 1 rubygems