Sha256: ded1c901ef18c7308b1ebcea57f8c780188ade7785328813d66232c07d4327b1

Contents?: true

Size: 703 Bytes

Versions: 2

Compression:

Stored size: 703 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 } }

  describe "sitemap", vcr: true, :order => :defined do
    it 'should succeed' do
      subject.options = cli_options
      expect { subject.sitemap }.to output(/1 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(1)
      expect(doc.xpath("//xmlns:loc").last.text).to eq("https://search.test.datacite.org/")
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
maltese-0.8.1 spec/cli_spec.rb
maltese-0.8 spec/cli_spec.rb