mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
provisioning: fix tests for save provisioned dashboard modal
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import { SaveProvisionedDashboardModalCtrl } from '../save_provisioned_modal';
|
import { SaveProvisionedDashboardModalCtrl } from '../save_provisioned_modal';
|
||||||
import { describe, it, expect } from 'test/lib/common';
|
|
||||||
|
|
||||||
describe('SaveProvisionedDashboardModalCtrl', () => {
|
describe('SaveProvisionedDashboardModalCtrl', () => {
|
||||||
var json = {
|
var json = {
|
||||||
@@ -21,8 +20,11 @@ describe('SaveProvisionedDashboardModalCtrl', () => {
|
|||||||
|
|
||||||
var ctrl = new SaveProvisionedDashboardModalCtrl(mockDashboardSrv);
|
var ctrl = new SaveProvisionedDashboardModalCtrl(mockDashboardSrv);
|
||||||
|
|
||||||
it('verify that the id have been removed', () => {
|
it('should remove id from dashboard model', () => {
|
||||||
var copy = ctrl.getJsonForClipboard();
|
expect(ctrl.dash.id).toBeUndefined();
|
||||||
expect(copy).toBe(`{"title":"name"}`);
|
});
|
||||||
|
|
||||||
|
it('should remove id from dashboard model in clipboard json', () => {
|
||||||
|
expect(ctrl.getJsonForClipboard()).toBe(JSON.stringify({ title: 'name' }, null, 2));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user