Sha256: 8c48048dcd98a08574ced98ecc1935017e35672c3d51a37c0ea517a016f21a08

Contents?: true

Size: 355 Bytes

Versions: 10

Compression:

Stored size: 355 Bytes

Contents

require 'spec_helper'
require 'cancan/matchers'

describe 'Abilities for Operations', type: :model do
  describe "a registered user" do
    let(:user) { create(:user) }
    subject { Ability.new(user) }
    it { is_expected.to be_able_to(:read, build(:operation, user: user)) }
    it { is_expected.not_to be_able_to(:read, build(:operation)) }
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/abilities/operation_ability_spec.rb
hyrax-1.1.0 spec/abilities/operation_ability_spec.rb
hyrax-1.0.5 spec/abilities/operation_ability_spec.rb
hyrax-1.0.4 spec/abilities/operation_ability_spec.rb
hyrax-1.0.3 spec/abilities/operation_ability_spec.rb
hyrax-1.0.2 spec/abilities/operation_ability_spec.rb
hyrax-1.0.1 spec/abilities/operation_ability_spec.rb
hyrax-1.0.0.rc2 spec/abilities/operation_ability_spec.rb
hyrax-1.0.0.rc1 spec/abilities/operation_ability_spec.rb
test_hyrax-0.0.1.alpha spec/abilities/operation_ability_spec.rb