spec/integration/server/sitemap_spec.rb in locomotivecms_steam-1.4.1 vs spec/integration/server/sitemap_spec.rb in locomotivecms_steam-1.5.0.beta1
- old
+ new
@@ -19,16 +19,18 @@
before { Locomotive::Steam::Adapters::Filesystem::SimpleCacheStore.new.clear }
it 'checks if it looks valid' do
expect(Nokogiri::XML(subject).errors.empty?).to eq true
- expect(subject.scan(/<url>/).size).to eq 25
+ expect(subject.scan(/<url>/).size).to eq 22
expect(subject).to match("<loc>http://example.org/songs/song-number-2/band</loc>")
+ expect(subject).to match(%(<xhtml:link rel="alternate" hreflang="fr" href="http://example.org/fr/a-notre-sujet" />))
expect(subject).to match((<<-EOF
<url>
- <loc>http://example.org/fr/a-notre-sujet</loc>
+ <loc>http://example.org/about-us</loc>
<lastmod>2015-03-25</lastmod>
- <priority>0.9</priority>
+ <xhtml:link rel="alternate" hreflang="fr" href="http://example.org/fr/a-notre-sujet" />
+ <xhtml:link rel="alternate" hreflang="nb" href="http://example.org/nb/om-oss" />
</url>
EOF
).strip)
end