64b4487d8e
* No 'v' in version HTML anchor The footer version output links to https://www.github.com/hashicorp/vault/blob/master/CHANGELOG.md#v160 (in Version 1.6.0) but you reach the anchor with https://github.com/hashicorp/vault/blob/master/CHANGELOG.md#160 (without 'v' before the version number) * Removed 'v' from URL version anchor * Create 10491.txt Co-authored-by: Chelsea Shaw <chelshaw.dev@gmail.com>
30 lines
1 KiB
JavaScript
30 lines
1 KiB
JavaScript
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
import { changelogUrlFor } from '../../../helpers/changelog-url-for';
|
|
|
|
const CHANGELOG_URL = 'https://www.github.com/hashicorp/vault/blob/master/CHANGELOG.md#';
|
|
|
|
module('Integration | Helper | changelog-url-for', function(hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
test('it builds an enterprise URL', function(assert) {
|
|
const result = changelogUrlFor(['1.5.0+prem']);
|
|
assert.equal(result, CHANGELOG_URL.concat('150'));
|
|
});
|
|
|
|
test('it builds an OSS URL', function(assert) {
|
|
const result = changelogUrlFor(['1.4.3']);
|
|
assert.equal(result, CHANGELOG_URL.concat('143'));
|
|
});
|
|
|
|
test('it returns the base changelog URL if the version is less than 1.4.3', function(assert) {
|
|
const result = changelogUrlFor(['1.4.0']);
|
|
assert.equal(result, CHANGELOG_URL);
|
|
});
|
|
|
|
test('it returns the base changelog URL if version cannot be found', function(assert) {
|
|
const result = changelogUrlFor(['']);
|
|
assert.equal(result, CHANGELOG_URL);
|
|
});
|
|
});
|