Sha256: 24425de42e3ef1931cb092bb0e835d9ec22f437135326720976e18c1d2bcb573
Contents?: true
Size: 602 Bytes
Versions: 33
Compression:
Stored size: 602 Bytes
Contents
require 'spec_helper' describe ActiveFedora::Base do describe '.attach_file' do let(:test_object) { ActiveFedora::Base.new } let(:ds) { ActiveFedora::File.new(@test_object, 'ds_to_add') } it "should not call File.save" do expect(ds).to receive(:save).never test_object.attach_file(ds, 'ds1') end it "should add the datastream to the datastreams_in_memory array" do expect(test_object.attached_files).to_not have_key(:ds_to_add) test_object.attach_file(ds, 'ds_to_add') expect(test_object.attached_files).to have_key(:ds_to_add) end end end
Version data entries
33 entries across 33 versions & 1 rubygems