mirror of
https://github.com/nasa/openmct.git
synced 2025-02-06 11:09:21 +00:00
[Licenses] Add spec
Add spec for the license controller (used to populate the template for the licenses page, WTD-669) to ensure code coverage.
This commit is contained in:
parent
10245949b2
commit
5949580b0a
30
platform/commonUI/about/test/LicenseControllerSpec.js
Normal file
30
platform/commonUI/about/test/LicenseControllerSpec.js
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/*global define,Promise,describe,it,expect,beforeEach,waitsFor,jasmine*/
|
||||||
|
|
||||||
|
define(
|
||||||
|
['../src/LicenseController'],
|
||||||
|
function (LicenseController) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
describe("The License controller", function () {
|
||||||
|
var testLicenses,
|
||||||
|
controller;
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
testLicenses = [
|
||||||
|
{ name: "A" },
|
||||||
|
{ name: "B" },
|
||||||
|
{ name: "C" }
|
||||||
|
];
|
||||||
|
controller = new LicenseController(testLicenses);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("exposes license information", function () {
|
||||||
|
// LicenseController is just there to pass licenses[]
|
||||||
|
// extensions down to the template.
|
||||||
|
expect(controller.licenses()).toEqual(testLicenses);
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
);
|
@ -1,4 +1,5 @@
|
|||||||
[
|
[
|
||||||
"AboutController",
|
"AboutController",
|
||||||
|
"LicenseController",
|
||||||
"LogoController"
|
"LogoController"
|
||||||
]
|
]
|
Loading…
x
Reference in New Issue
Block a user