diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 7f74c5c..fe6bc2a 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -10,6 +10,7 @@ describe Jekyll::SeoTag do let(:output) { Liquid::Template.parse("{% #{tag} #{text} %}").render!(context, {}) } let(:json) { output.match(%r{}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(//) 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