-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathhead-test.js
More file actions
27 lines (21 loc) · 889 Bytes
/
head-test.js
File metadata and controls
27 lines (21 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { visit } from '@ember/test-helpers';
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
module('Acceptance | head', function (hooks) {
setupApplicationTest(hooks);
hooks.beforeEach(function () {
this.head = document.querySelector('head');
});
test('no link rel=canonical for release url', async function (assert) {
await visit('/ember/release/classes/Application');
assert.dom('link[rel=canonical]', this.head).doesNotExist();
});
test('shows link rel=canonical for version url', async function (assert) {
await visit('/ember/2.16/classes/Application');
assert.dom('link[rel=canonical]', this.head).hasAttribute('href');
});
test('no link rel=canonical when root url visited', async function (assert) {
await visit('/');
assert.dom('link[rel=canonical]', this.head).doesNotExist();
});
});