mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 23:21:08 +02:00
* Update reporting addon * Update usage page data mappings Remove display name mapping per design review * Update after feedback from design Copywrite headers * Remove the old name mapping test from the usage page * Update tooltips to have periods Update namespaces tooltip
28 lines
906 B
JavaScript
28 lines
906 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
*/
|
|
|
|
import { module, test } from 'qunit';
|
|
import { setupRenderingTest } from 'vault/tests/helpers';
|
|
import { render } from '@ember/test-helpers';
|
|
import { hbs } from 'ember-cli-htmlbars';
|
|
import sinon from 'sinon';
|
|
|
|
module('Integration | Component | usage | Page::Usage', function (hooks) {
|
|
setupRenderingTest(hooks);
|
|
|
|
hooks.beforeEach(async function () {
|
|
this.api = this.owner.lookup('service:api');
|
|
this.generateUtilizationReportStub = sinon.stub(this.api.sys, 'generateUtilizationReport').resolves({});
|
|
});
|
|
|
|
hooks.afterEach(function () {
|
|
this.generateUtilizationReportStub.restore();
|
|
});
|
|
|
|
test('it provides the correct fetch function to the dashboard component', async function (assert) {
|
|
await render(hbs`<Usage::Page />`);
|
|
assert.true(this.generateUtilizationReportStub.calledOnce, 'fetch function is called on render');
|
|
});
|
|
});
|