Sha256: a994b6af31af9921647129d37ddb0677b32db5c0f0af3070431ae52c3b6042e3
Contents?: true
Size: 756 Bytes
Versions: 3
Compression:
Stored size: 756 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://commons.stage.datacite.org/doi.org/10.70122/fk2/hlrkok") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
maltese-0.9.12 | spec/cli_spec.rb |
maltese-0.9.11 | spec/cli_spec.rb |
maltese-0.9.10 | spec/cli_spec.rb |