Sha256: 2fed96338eca67bd4da4e79544df84aa58874359565f9c7859f7769d3f4dbe9b

Contents?: true

Size: 486 Bytes

Versions: 12

Compression:

Stored size: 486 Bytes

Contents

describe LsidResolver do
  describe '.resolve' do
    let(:lsid) { 'urn:lsid:ubio.org:classificationbank:2232671' }

    it 'resolves lsid using tdwg service' do
      stub_request(:get,
                   %r|#{Biodiversity::LSID_RESOLVER_URL + lsid}|).to_return do
        { body: File.read(File.expand_path('../../files/lsid.xml', __FILE__)) }
      end
      expect(LsidResolver.resolve lsid).
             to match %r|<dc:title>Pternistis Wagler 1832</dc:title>|
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
biodiversity-3.5.1 spec/guid/lsid.spec.rb
biodiversity-3.5.0 spec/guid/lsid.spec.rb
biodiversity-3.4.6 spec/guid/lsid.spec.rb
biodiversity-3.4.5 spec/guid/lsid.spec.rb
biodiversity-3.4.4 spec/guid/lsid.spec.rb
biodiversity-3.4.3 spec/guid/lsid.spec.rb
biodiversity-3.4.2 spec/guid/lsid.spec.rb
biodiversity-3.4.1 spec/guid/lsid.spec.rb
biodiversity-3.4.0 spec/guid/lsid.spec.rb
biodiversity-3.3.0 spec/guid/lsid.spec.rb
biodiversity-3.2.1 spec/guid/lsid.spec.rb
biodiversity-3.2.0 spec/guid/lsid.spec.rb