Specs for pagination.
This commit is contained in:
parent
edd65c3f14
commit
7fefcdef3f
|
@ -10,6 +10,7 @@ describe Jekyll::SeoTag do
|
|||
let(:output) { Liquid::Template.parse("{% #{tag} #{text} %}").render!(context, {}) }
|
||||
let(:json) { output.match(%r{<script type=\"application/ld\+json\">(.*)</script>}m)[1] }
|
||||
let(:json_data) { JSON.parse(json) }
|
||||
let(:paginator) { { 'previous_page' => true, 'previous_page_path' => 'foo', 'next_page' => true, 'next_page_path' => 'bar' } }
|
||||
|
||||
before do
|
||||
Jekyll.logger.log_level = :error
|
||||
|
@ -443,4 +444,13 @@ EOS
|
|||
expect(output).not_to match(/<title>/)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with pagination' do
|
||||
let(:context) { make_context(environments: { 'paginator' => paginator }) }
|
||||
|
||||
it 'outputs pagination links' do
|
||||
expect(output).to match(%r{<link rel="prev" href="foo">})
|
||||
expect(output).to match(%r{<link rel="next" href="bar">})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue