Skip to content

Commit

Permalink
add test for og:type
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Dec 4, 2020
1 parent 21a920e commit 5099360
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/acceptance/meta-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ module('Acceptance | meta test', function(hooks) {
.hasAttribute('content', 'Thoughts, stories and ideas.');
assert.dom('head link[rel="canonical"]', document)
.hasAttribute('href', 'https://empress-blog.netlify.com/');
assert.dom('head meta[property="og:type"]', document)
.hasAttribute('content', 'website');
});

test('content meta', async function(assert) {
Expand All @@ -38,6 +40,8 @@ module('Acceptance | meta test', function(hooks) {
.hasAttribute('content');
assert.dom('head meta[property="article:tag"]', document)
.hasAttribute('content', 'Getting Started');
assert.dom('head meta[property="og:type"]', document)
.hasAttribute('content', 'article');
})

test('page meta', async function(assert) {
Expand All @@ -53,6 +57,8 @@ module('Acceptance | meta test', function(hooks) {
.hasAttribute('content', 'Chris Manson');
assert.dom('head link[rel="canonical"]', document)
.hasAttribute('href', 'https://empress-blog.netlify.com/page/chris-manson/');
assert.dom('head meta[property="og:type"]', document)
.hasAttribute('content', 'website');
});

test('author meta', async function(assert) {
Expand All @@ -64,6 +70,8 @@ module('Acceptance | meta test', function(hooks) {
.hasAttribute('content', 'You can delete this user to remove all the welcome posts');
assert.dom('head link[rel="canonical"]', document)
.hasAttribute('href', 'https://empress-blog.netlify.com/author/ghost/');
assert.dom('head meta[property="og:type"]', document)
.hasAttribute('content', 'website');
});

test('tag meta', async function(assert) {
Expand All @@ -75,5 +83,7 @@ module('Acceptance | meta test', function(hooks) {
.hasAttribute('content', 'A description for the getting-started tag. If you delete this line it will say A collection of X posts where the description should go.');
assert.dom('head link[rel="canonical"]', document)
.hasAttribute('href', 'https://empress-blog.netlify.com/tag/getting-started/');
assert.dom('head meta[property="og:type"]', document)
.hasAttribute('content', 'website');
});
});

0 comments on commit 5099360

Please sign in to comment.