mirror of
https://github.com/nasa/openmct.git
synced 2025-06-12 20:28:14 +00:00
[Testing] Add ExportImageService mock
This commit is contained in:
@ -1,3 +1,5 @@
|
|||||||
|
/*global angular*/
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Open MCT, Copyright (c) 2014-2016, United States Government
|
* Open MCT, Copyright (c) 2014-2016, United States Government
|
||||||
* as represented by the Administrator of the National Aeronautics and Space
|
* as represented by the Administrator of the National Aeronautics and Space
|
||||||
@ -30,6 +32,7 @@ define(
|
|||||||
describe("The plot controller", function () {
|
describe("The plot controller", function () {
|
||||||
var mockScope,
|
var mockScope,
|
||||||
mockElement,
|
mockElement,
|
||||||
|
mockExportImageService,
|
||||||
mockFormatter,
|
mockFormatter,
|
||||||
mockHandler,
|
mockHandler,
|
||||||
mockThrottle,
|
mockThrottle,
|
||||||
@ -67,6 +70,10 @@ define(
|
|||||||
["$watch", "$on", "$emit"]
|
["$watch", "$on", "$emit"]
|
||||||
);
|
);
|
||||||
mockElement = angular.element('<div />');
|
mockElement = angular.element('<div />');
|
||||||
|
mockExportImageService = jasmine.createSpyObj(
|
||||||
|
"ExportImageService",
|
||||||
|
["exportJPG", "exportPNG", "exportPDF"]
|
||||||
|
);
|
||||||
mockFormatter = jasmine.createSpyObj(
|
mockFormatter = jasmine.createSpyObj(
|
||||||
"formatter",
|
"formatter",
|
||||||
["formatDomainValue", "formatRangeValue"]
|
["formatDomainValue", "formatRangeValue"]
|
||||||
@ -110,6 +117,7 @@ define(
|
|||||||
controller = new PlotController(
|
controller = new PlotController(
|
||||||
mockScope,
|
mockScope,
|
||||||
mockElement,
|
mockElement,
|
||||||
|
mockExportImageService,
|
||||||
mockFormatter,
|
mockFormatter,
|
||||||
mockHandler,
|
mockHandler,
|
||||||
mockThrottle
|
mockThrottle
|
||||||
|
Reference in New Issue
Block a user