Sha256: 6cd605d594822033dba1a5c2e7c31fce152a5b98d5f88d6b70b15dbbc9e2208c
Contents?: true
Size: 1.23 KB
Versions: 12
Compression:
Stored size: 1.23 KB
Contents
require 'spec_helper' module Ddr::Models RSpec.describe DescriptiveMetadata do let(:obj) { FactoryGirl.build(:item) } describe "terminology" do subject { described_class.unqualified_names } it { is_expected.to_not include(:license) } it "should have a term for each term name in the RDF::DC vocab, except :license" do expect(subject).to include(*(Ddr::Vocab::Vocabulary.term_names(RDF::DC) - [:license])) end it "should have a term for each term name in the DukeTerms vocab" do expect(subject).to include(*Ddr::Vocab::Vocabulary.term_names(Ddr::Vocab::DukeTerms)) end end describe "using the set_values and add_value methods" do let(:ds) { described_class.new(obj) } before { ds.type = ["Photograph"] } describe "#set_values" do it "should set the values of the term to those supplied" do ds.set_values :type, [ "Image", "Still Image" ] expect(ds.type).to eq([ "Image", "Still Image" ]) end end describe "#add_value" do it "should add the supplied value to those of the term" do ds.add_value :type, "Image" expect(ds.type).to eq([ "Photograph", "Image" ]) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems