Sha256: fec4277e038052ad07c9168a297f3a111e56b18d9e7d2195b7129f75a6fa7039
Contents?: true
Size: 1.02 KB
Versions: 34
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe ActiveFedora::WithMetadata::MetadataNode do let(:generated_schema) { Class.new(described_class) } let(:file) { ActiveFedora::File.new } let(:node) { generated_schema.new(file) } let(:book) { RDF::URI.new('http://example.com/ns/Book') } describe "#changed_attributes" do subject { node.changed_attributes } context "when type is not set" do it { is_expected.to eq({}) } end context "when type is set" do before do generated_schema.configure type: book end it { is_expected.to eq('type' => true) } end end describe "changes_for_update" do subject { node.send(:changes_for_update) } context "when type is not set" do it { is_expected.to eq({}) } end context "when type is set" do before do generated_schema.configure type: book end it "is expected to have the rdf type statement" do expect(subject[::RDF.type]).to be_kind_of RDF::Queryable::Enumerator end end end end
Version data entries
34 entries across 34 versions & 1 rubygems