[Testing] Add ExportImageService mock

This commit is contained in:
David Hudson
2016-09-03 14:45:09 +09:00
parent fecf419f83
commit a566265a72

View File

@ -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