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