Sha256: b7cb218433421db419050d63d971ce24649534ed45c0181b44ffbcf4fa2deb2d
Contents?: true
Size: 1.04 KB
Versions: 55
Compression:
Stored size: 1.04 KB
Contents
require 'spec_helper' describe ActiveFedora::UnsavedDigitalObject do describe "an unsaved instance" do before do @obj = ActiveFedora::UnsavedDigitalObject.new(ActiveFedora::Base, 'bar') end it "should have ownerId property" do @obj.ownerId = 'fooo' @obj.ownerId.should == 'fooo' end it "should have a default pid" do @obj.pid.should == "__DO_NOT_USE__" end it "should be able to set the pid" do @obj.pid = "my:new_object" @obj.pid.should == "my:new_object" end end describe "#save" do before :all do obj = ActiveFedora::UnsavedDigitalObject.new(ActiveFedora::Base, 'bar') obj.label = 'my label' obj.ownerId = 'fooo' @saved_obj = obj.save end it "should be a digital object" do @saved_obj.should be_kind_of ActiveFedora::DigitalObject end it "should set the ownerId property" do @saved_obj.ownerId.should == 'fooo' end it "should set the label property" do @saved_obj.label.should == 'my label' end end end
Version data entries
55 entries across 55 versions & 1 rubygems