Sha256: f61191cea8f71555acbed04ce7c6e8e9edf626f93a2a1394981c338340d399e6
Contents?: true
Size: 762 Bytes
Versions: 3
Compression:
Stored size: 762 Bytes
Contents
require 'spec_helper' require 'maltese/cli' describe Maltese::CLI do let(:subject) do described_class.new end let(:sitemap_bucket) { "search.test.datacite.org" } let(:cli_options) { { sitemap_bucket: sitemap_bucket, rack_env: "test" } } describe "sitemap", vcr: true, :order => :defined do it 'should succeed' do subject.options = cli_options expect { subject.sitemap }.to output(/1001 links/).to_stdout sitemap = Zlib::GzipReader.open("public/sitemaps/sitemap.xml.gz") { |gz| gz.read } doc = Nokogiri::XML(sitemap) expect(doc.xpath("//xmlns:url").size).to eq(1001) expect(doc.xpath("//xmlns:loc").last.text).to eq("https://search.test.datacite.org/works/10.1080/19393210.2019.1576774") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
maltese-0.9.5 | spec/cli_spec.rb |
maltese-0.9.4 | spec/cli_spec.rb |
maltese-0.9.3 | spec/cli_spec.rb |