Sha256: 3c59a43f2f63e9338f887ea657c5e5b94e849a2cba5bceccee8429a86cd72e69

Contents?: true

Size: 852 Bytes

Versions: 22

Compression:

Stored size: 852 Bytes

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
  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

22 entries across 22 versions & 1 rubygems

Version Path
active-fedora-4.1.0 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc20 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc19 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc18 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc17 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc16 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc15 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc14 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc13 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc12 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc11 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc10 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc9 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc8 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc7 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc6 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc5 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc4 spec/unit/unsaved_digital_object_spec.rb
active-fedora-4.0.0.rc3 spec/unit/unsaved_digital_object_spec.rb