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

Version Path
qa-5.10.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.9.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.8.1 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.8.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.7.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.6.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.5.2 spec/lib/services/rdf_authority_parser_spec.rb
qa-4.3.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-3.1.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-2.3.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.5.1 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.5.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.4.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.3.1 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.3.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.2.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.1.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-5.0.0 spec/lib/services/rdf_authority_parser_spec.rb
qa-4.2.4 spec/lib/services/rdf_authority_parser_spec.rb
qa-4.2.3 spec/lib/services/rdf_authority_parser_spec.rb