spec/abilities/operation_ability_spec.rb in hyrax-1.1.1 vs spec/abilities/operation_ability_spec.rb in hyrax-2.0.0.beta1

- old
+ new

@@ -1,11 +1,12 @@ -require 'spec_helper' require 'cancan/matchers' -describe 'Abilities for Operations', type: :model do +RSpec.describe 'Abilities for Operations', type: :model do describe "a registered user" do - let(:user) { create(:user) } subject { Ability.new(user) } + + let(:user) { create(: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