2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2020-08-20 14:29:16 +00:00
|
|
|
import { module, test } from 'qunit';
|
|
|
|
import { setupRenderingTest } from 'ember-qunit';
|
|
|
|
import { render } from '@ember/test-helpers';
|
|
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
|
|
|
2022-09-15 08:43:17 +00:00
|
|
|
module('Integration | Helper | format-short-time', function (hooks) {
|
2020-08-20 14:29:16 +00:00
|
|
|
setupRenderingTest(hooks);
|
|
|
|
|
|
|
|
// Replace this with your real tests.
|
2022-09-15 08:43:17 +00:00
|
|
|
test('it renders', async function (assert) {
|
2020-08-20 14:29:16 +00:00
|
|
|
this.set('inputValue', '7200000');
|
|
|
|
|
2020-12-15 18:29:32 +00:00
|
|
|
await render(hbs`{{format-short-time inputValue}}`);
|
2020-08-20 14:29:16 +00:00
|
|
|
|
|
|
|
assert.equal(this.element.textContent.trim(), '2h');
|
|
|
|
});
|
|
|
|
});
|