Fix JSON-LD tests

There is no reason to test for `site` variables each time we check
JSON-LD. Let's only test what we say we are going to test at each stage.
This commit is contained in:
Pat Hawks 2016-02-22 10:36:46 -08:00
parent a9c7499319
commit c51ef4db83
1 changed files with 9 additions and 3 deletions

View File

@ -124,7 +124,6 @@ describe Jekyll::SeoTag do
it 'outputs the logo' do
expect(json_data['logo']).to eql('http://example.invalid/logo.png')
expect(json_data['url']).to eql('http://example.invalid')
end
end
@ -133,8 +132,6 @@ describe Jekyll::SeoTag do
it 'outputs the site title meta' do
expect(output).to match(%r{<meta property="og:site_name" content="Foo" />})
expect(json_data['name']).to eql('Foo')
expect(json_data['url']).to eql('http://example.invalid')
end
end
end
@ -254,6 +251,15 @@ describe Jekyll::SeoTag do
let(:links) { ['http://foo.invalid', 'http://bar.invalid'] }
let(:social_namespace) { { 'name' => 'Ben', 'links' => links } }
let(:site) { make_site('social' => social_namespace) }
let(:meta) do
{
'permalink' => '/',
'seo' => {
'type' => 'person'
}
}
end
let(:page) { make_post(meta) }
it 'outputs social meta' do
expect(json_data['@type']).to eql('person')