mirror of
https://github.com/nasa/openmct.git
synced 2025-02-18 16:40:58 +00:00
[Move] correct logic and specification
This commit is contained in:
parent
26892e7104
commit
a94763041e
@ -75,7 +75,7 @@ define(
|
||||
oldLocationCapability = object
|
||||
.getCapability('location');
|
||||
if (!newLocationCapability ||
|
||||
oldLocationCapability) {
|
||||
!oldLocationCapability) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -162,7 +162,8 @@ define(
|
||||
'locationCapability',
|
||||
[
|
||||
'isOriginal',
|
||||
'setPrimaryLocation'
|
||||
'setPrimaryLocation',
|
||||
'getContextualLocation'
|
||||
]
|
||||
);
|
||||
|
||||
@ -195,13 +196,15 @@ define(
|
||||
|
||||
describe("when moving an original", function () {
|
||||
beforeEach(function () {
|
||||
locationCapability.getContextualLocation
|
||||
.andReturn('new-location');
|
||||
locationCapability.isOriginal.andReturn(true);
|
||||
linkService.perform.mostRecentCall.promise.resolve();
|
||||
});
|
||||
|
||||
it("updates location", function () {
|
||||
expect(locationCapability.setPrimaryLocation)
|
||||
.toHaveBeenCalled();
|
||||
.toHaveBeenCalledWith('new-location');
|
||||
});
|
||||
|
||||
describe("after location update", function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user