Sha256: 6998adaeb58cd18b856434c03adff6a25cc49d192147a5840f0b951783027eb9
Contents?: true
Size: 654 Bytes
Versions: 10
Compression:
Stored size: 654 Bytes
Contents
require 'spec_helper' require 'cancan/matchers' describe "Ability on embargos and leases" do subject { Ability.new(current_user) } let(:current_user) { create(:user) } describe "a regular user" do it do is_expected.not_to be_able_to :index, Hydra::AccessControls::Embargo is_expected.not_to be_able_to :index, Hydra::AccessControls::Lease end end describe "an admin user" do before { allow(current_user).to receive(:groups).and_return(['admin']) } it do is_expected.to be_able_to :index, Hydra::AccessControls::Embargo is_expected.to be_able_to :index, Hydra::AccessControls::Lease end end end
Version data entries
10 entries across 10 versions & 2 rubygems