mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 06:08:11 +00:00
[Scrolling] Fill in specs
Fill in specs for ScrollingListController, and for the specific Column types that support it. Separate out the code that produces actual rows in order to improve testability and maintainability. WTD-534.
This commit is contained in:
@ -9,6 +9,29 @@ define(
|
||||
"use strict";
|
||||
|
||||
describe("A name column", function () {
|
||||
var mockDomainObject,
|
||||
column;
|
||||
|
||||
beforeEach(function () {
|
||||
mockDomainObject = jasmine.createSpyObj(
|
||||
"domainObject",
|
||||
[ "getModel" ]
|
||||
);
|
||||
mockDomainObject.getModel.andReturn({
|
||||
name: "Test object name"
|
||||
});
|
||||
column = new NameColumn();
|
||||
});
|
||||
|
||||
it("reports a column header", function () {
|
||||
expect(column.getTitle()).toEqual("Name");
|
||||
});
|
||||
|
||||
it("looks up name from an object's model", function () {
|
||||
expect(column.getValue(mockDomainObject))
|
||||
.toEqual("Test object name");
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user