Sha256: 4a4892b1b6bddc8ce5f2107c8a57885148ea851e8e2d33e3d808983225ea5e68
Contents?: true
Size: 1001 Bytes
Versions: 18
Compression:
Stored size: 1001 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Hydra::ModelMethods do before :all do class TestModel < ActiveFedora::Base include Hydra::ModelMixins::CommonMetadata include Hydra::ModelMethods has_metadata :name => "properties", :type => Hydra::Datastream::Properties end end describe "apply_depositor_metadata" do subject {TestModel.new } it "should add edit access" do subject.apply_depositor_metadata('naomi') subject.rightsMetadata.individuals.should == {'naomi' => 'edit'} end it "should not overwrite people with edit access" do subject.rightsMetadata.permissions({:person=>"jessie"}, 'edit') subject.apply_depositor_metadata('naomi') subject.rightsMetadata.individuals.should == {'naomi' => 'edit', 'jessie' =>'edit'} end it "should set depositor" do subject.apply_depositor_metadata('chris') subject.properties.depositor.should == ['chris'] end end end
Version data entries
18 entries across 18 versions & 2 rubygems