Sha256: 842056f859b387bd7e71077bd56300099cef0549739623d32276d2a9e803dc05

Contents?: true

Size: 695 Bytes

Versions: 15

Compression:

Stored size: 695 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Decidim::Admin::Abilities::ParticipatoryProcessCollaboratorAbility do
  let(:user) { build(:user) }
  let(:user_process) { create :participatory_process, organization: user.organization }
  let(:unmanaged_process) { create :participatory_process, organization: user.organization }

  subject { described_class.new(user, current_participatory_process: user_process) }

  before do
    create :participatory_process_user_role, user: user, participatory_process: user_process, role: :collaborator
  end

  it { is_expected.to be_able_to(:preview, user_process) }
  it { is_expected.not_to be_able_to(:preview, unmanaged_process) }
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
decidim-0.6.8 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.7 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.6 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.5 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.4 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.3 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.2 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.1 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.6.0 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.5.1 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.5.0 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.4.4 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.4.3 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.4.2 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb
decidim-0.4.1 decidim-admin/spec/models/abilities/participatory_process_collaborator_ability_spec.rb