spec/models/ability_spec.rb in ddr-models-1.12.3 vs spec/models/ability_spec.rb in ddr-models-1.13.0

- old
+ new

@@ -7,14 +7,12 @@ subject { described_class.new(user) } let(:user) { FactoryGirl.create(:user) } describe "collection permissions" do - before { allow(Ddr::Auth).to receive(:collection_creators_group) { "Collection Creators" } } - context "user is a collection creator" do - before { allow(user).to receive(:groups) { ["Collection Creators"] } } + before { allow(user).to receive(:groups) { [Groups::CollectionCreators] } } it { is_expected.to be_able_to(:create, Collection) } end context "user is not a collection creator" do it { is_expected.not_to be_able_to(:create, Collection) } @@ -266,13 +264,9 @@ end end end # download_permissions - - describe "#discover_permissions" do - # TODO - end describe "#events_permissions", events: true do let(:resource) { Ddr::Events::Event.new(pid: "test:1") } context "when the user can read the object" do