Sha256: fbc00658f1eb369e32f9471cc8b41eb24f6231e6aa9fa5576ccdf1b1c3a8f3f2
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' require 'active_fedora' require 'active_fedora/model' require 'rexml/document' include ActiveFedora::Model describe 'bugs' do before do class FooHistory < ActiveFedora::Base has_metadata :type => ActiveFedora::SimpleDatastream, :name => 'someData' do |m| m.field 'fubar', :string end end @test_object = FooHistory.new @test_object.save end after do @test_object.delete Object.send(:remove_const, :FooHistory) end it 'should raise ActiveFedora::ObjectNotFoundError when find("")' do expect { FooHistory.find('') }.to raise_error(ActiveFedora::ObjectNotFoundError) end it 'should not clobber everything when setting a value' do @test_object.someData.fubar = ['initial'] @test_object.save! x = FooHistory.find(@test_object.pid) x.someData.fubar = ['replacement'] # set a new value x.save! x = FooHistory.find(@test_object.pid) expect(x.someData.fubar).to eq(['replacement']) # recall the value x.save end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active-fedora-6.8.0 | spec/integration/bug_spec.rb |