Sha256: cb3d4b2cba993d15dcf388e08f743e91c61c6eacb6f1d6433450c3bf292cc43c
Contents?: true
Size: 586 Bytes
Versions: 33
Compression:
Stored size: 586 Bytes
Contents
require 'spec_helper' describe ActiveFedora::Base do it { is_expected.not_to be_readonly } describe "#readonly!" do it "should make the object readonly" do expect { subject.readonly! }.to change { subject.readonly? }.from(false).to(true) end end context "a readonly record" do before { subject.readonly! } it "should not be destroyable" do expect { subject.destroy }.to raise_error ActiveFedora::ReadOnlyRecord end it "should not be mutable" do expect { subject.save }.to raise_error ActiveFedora::ReadOnlyRecord end end end
Version data entries
33 entries across 33 versions & 1 rubygems