Sha256: a8eccc3292f47d800a0b6d40f45ffea5fba722011b661645a06135724ffd55b0

Contents?: true

Size: 513 Bytes

Versions: 10

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Decidim::Admin::Abilities::UserManagerAbility do
  let(:user) { build(:user, :user_manager) }

  subject { described_class.new(user, {}) }

  context "when the user is not a user manager" do
    let(:user) { build(:user) }

    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, :managed_users) }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
decidim-0.6.7 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.6 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.5 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.4 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.3 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.2 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.1 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.6.0 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.5.1 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb
decidim-0.5.0 decidim-admin/spec/models/abilities/user_manager_ability_spec.rb