• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pulibrary / pdc_discovery / 3823446b-c57e-4abf-8330-d3cff9d77076

pending completion
3823446b-c57e-4abf-8330-d3cff9d77076

Pull #382

circleci

Hector Correa
When importing dataspace records, skip those that have matching records already imported from PDC Describe
Pull Request #382: Give priority to PDC Describe records when indexing records

5 of 5 new or added lines in 1 file covered. (100.0%)

1714 of 1932 relevant lines covered (88.72%)

102.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.41
/spec/requests/catalog_spec.rb
1
# frozen_string_literal: true
2
require 'rails_helper'
1✔
3

4
RSpec.describe "Catalog", type: :request do
1✔
5
  let(:dspace_fixtures) { File.read(File.join(fixture_path, 'spherical_torus.xml')) }
5✔
6
  let(:indexer) do
1✔
7
    DspaceIndexer.new(dspace_fixtures)
4✔
8
  end
9
  before do
1✔
10
    indexer.index
4✔
11
  end
12

13
  describe "GET /doi/:doi" do
1✔
14
    let(:doi) { "doi:10.1088/0029-5515/57/1/016034" }
1✔
15
    let(:document_id) { "84912" }
1✔
16

17
    it "retrieves Solr Documents using a given DOI" do
1✔
18
      get "/doi/#{doi}"
×
19
      expect(response).to redirect_to(solr_document_path(id: document_id))
×
20
    end
21

22
    context "when passing only a segment of the DOI" do
1✔
23
      let(:doi) { "10.1088/0029-5515/57/1/016034" }
1✔
24

25
      it "retrieves Solr Documents using a given DOI" do
1✔
26
        get "/doi/#{doi}"
×
27
        expect(response).to redirect_to(solr_document_path(id: document_id))
×
28
      end
29
    end
30
  end
31

32
  describe "GET /ark/:ark" do
1✔
33
    let(:ark) { "http://arks.princeton.edu/ark:/88435/dsp01kd17cw34n" }
1✔
34
    let(:document_id) { "84912" }
1✔
35
    it "retrieves Solr Documents using a given ARK" do
1✔
36
      get "/ark/#{ark}"
×
37
      expect(response).to redirect_to(solr_document_path(id: document_id))
×
38
    end
39

40
    context "when passing only a segment of the ARK" do
1✔
41
      let(:ark) { "88435/dsp01kd17cw34n" }
1✔
42

43
      it "retrieves Solr Documents using a given ARK" do
1✔
44
        get "/ark/#{ark}"
×
45
        expect(response).to redirect_to(solr_document_path(id: document_id))
×
46
      end
47
    end
48
  end
49
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc