Sha256: e25a86d98a2be55bfc326b4c7f987c5c0176a5765e96eb285a2702a07f348e93
Contents?: true
Size: 812 Bytes
Versions: 15
Compression:
Stored size: 812 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Decidim::Comments::Abilities::ParticipatoryProcessAdminAbility do let(:user) { build(:user) } let(:user_process) { create :participatory_process, organization: user.organization } let!(:user_role) { create :participatory_process_user_role, user: user, participatory_process: user_process, role: :admin } let(:context) { { current_participatory_process: user_process } } subject { described_class.new(user, context) } context "when the user is an admin" do let(:user) { build(:user, :admin) } it "doesn't have any permission" do expect(subject.permissions[:can]).to be_empty expect(subject.permissions[:cannot]).to be_empty end end it { is_expected.to be_able_to(:manage, Decidim::Comments::Comment) } end
Version data entries
15 entries across 15 versions & 1 rubygems