Sha256: cb69176c06da7f63982aa074df9acf63d0e4cade7b75c544f88ab36e17ce8ea9
Contents?: true
Size: 949 Bytes
Versions: 33
Compression:
Stored size: 949 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Qa::Services::RDFAuthorityParser do let(:source) { [File.join(fixture_path, '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
33 entries across 33 versions & 1 rubygems