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

pulibrary / pdc_discovery / 5af13607-7741-41ac-b110-c94c8a3ee0f0

pending completion
5af13607-7741-41ac-b110-c94c8a3ee0f0

Pull #441

circleci

hectorcorrea
Better error handling
Pull Request #441: Indexing to a new collection

99 of 99 new or added lines in 3 files covered. (100.0%)

1816 of 2220 relevant lines covered (81.8%)

95.45 hits per line

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

63.64
/spec/system/sitemap_spec.rb
1
# frozen_string_literal: true
2

3
RSpec.describe 'Dynamic Sitemap', type: :system, js: false do
1✔
4
  let(:globus_fixtures) { File.read(File.join(fixture_path, 'globus_items.xml')) }
5✔
5
  let(:indexer) do
1✔
6
    DspaceIndexer.new(globus_fixtures)
4✔
7
  end
8

9
  before do
1✔
10
    Blacklight.default_index.connection.delete_by_query("*:*")
4✔
11
    Blacklight.default_index.connection.commit
4✔
12
    indexer.index
4✔
13
  end
14

15
  context 'index' do
1✔
16
    it 'renders XML with a root element' do
1✔
17
      visit '/sitemap#index'
×
18
      expect(page).to have_xpath('//sitemapindex')
×
19
    end
20
    it 'renders at least 16 <sitemap> elements' do
1✔
21
      visit blacklight_dynamic_sitemap.sitemap_index_path
×
22
      expect(page).to have_xpath('//sitemap', count: 16)
×
23
    end
24
  end
25

26
  context 'show' do
1✔
27
    it 'renders XML with a root element' do
1✔
28
      visit blacklight_dynamic_sitemap.sitemap_path('1')
×
29
      expect(page).to have_xpath('//urlset')
×
30
    end
31
    it 'renders <url> elements' do
1✔
32
      visit blacklight_dynamic_sitemap.sitemap_path('1')
×
33
      expect(page).to have_xpath('//url', count: 1)
×
34
    end
35
  end
36
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