Sha256: 64c453314df4fd50e5333df0c3fff40e74179de1bce5b8beb4b3509c40da853c
Contents?: true
Size: 966 Bytes
Versions: 4
Compression:
Stored size: 966 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Qa::Services::RDFAuthorityParser do let(:source) { [Qa::Engine.root.join('spec', 'fixtures', 'lexvo_snippet.rdf.xml')] } let(:format) { 'rdfxml' } let(:predicate) { RDF::URI("http://www.w3.org/2008/05/skos#prefLabel") } let(:name) { 'language' } let(:alum_entry) { Qa::LocalAuthorityEntry.find_by(label: 'Alumu-Tesu') } let(:ari_entry) { Qa::LocalAuthorityEntry.find_by(label: 'Ari') } describe "#import_rdf" do before { described_class.import_rdf(name, source, format: format, predicate: predicate) } it "creates the authority and authority entries" do expect(Qa::LocalAuthority.count).to eq(1) expect(Qa::LocalAuthority.find_by(name: name)).not_to be_nil expect(Qa::LocalAuthorityEntry.count).to eq(2) expect(alum_entry.uri).to eq('http://lexvo.org/id/iso639-3/aab') expect(ari_entry.uri).to eq('http://lexvo.org/id/iso639-3/aac') end end end
Version data entries
4 entries across 4 versions & 1 rubygems