From ad5add05403cc70de27607e67e30516b69eae4b8 Mon Sep 17 00:00:00 2001 From: Bo Turnbow Date: Sat, 5 Mar 2016 12:19:14 -0800 Subject: [PATCH] Add tests for large image Twitter card --- lib/template.html | 5 ++--- spec/jekyll_seo_tag_spec.rb | 12 ++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/template.html b/lib/template.html index ab31930..95ffae1 100644 --- a/lib/template.html +++ b/lib/template.html @@ -132,13 +132,12 @@ {% endif %} {% if site.twitter %} - - {% if page.image %} + {% if seo_page_image %} {% else %} {% endif %} - + {% if seo_author_twitter %} diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 0f1bf5f..b3fae8f 100644 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -203,6 +203,9 @@ EOS let(:page) { make_page('author' => 'benbalter') } it 'outputs twitter card meta' do + expected = %r{} + expect(output).to match(expected) + expected = %r{} expect(output).to match(expected) @@ -241,6 +244,15 @@ EOS end end + context 'with page.image' do + let(:page) { make_page('image' => '/img/foo.png') } + + it 'outputs summary card with large image' do + expected = %r{} + expect(output).to match(expected) + end + end + context 'with page.author as a hash' do let(:page) { make_page('author' => { 'twitter' => '@test' }) }