[Persistence] Update move/copy/link specs

...to reflect re-consultation of policyService when the action
context changes due to dialog input.
This commit is contained in:
Victor Woeltjen 2015-11-10 12:40:52 -08:00
parent 76c1f5bfe9
commit 7114e9b150
4 changed files with 37 additions and 0 deletions

View File

@ -34,6 +34,7 @@ define(
describe("Move/copy/link Actions", function () {
var action,
policyService,
locationService,
locationServicePromise,
composeService,
@ -44,6 +45,11 @@ define(
newParent;
beforeEach(function () {
policyService = jasmine.createSpyObj(
'policyService',
[ 'allow' ]
);
selectedObjectContextCapability = jasmine.createSpyObj(
'selectedObjectContextCapability',
[
@ -87,6 +93,8 @@ define(
]
);
policyService.allow.andReturn(true);
locationService
.getLocationFromUser
.andReturn(locationServicePromise);
@ -102,6 +110,7 @@ define(
};
action = new AbstractComposeAction(
policyService,
locationService,
composeService,
context,
@ -153,6 +162,7 @@ define(
};
action = new AbstractComposeAction(
policyService,
locationService,
composeService,
context,

View File

@ -34,6 +34,7 @@ define(
describe("Copy Action", function () {
var copyAction,
policyService,
locationService,
locationServicePromise,
copyService,
@ -50,6 +51,12 @@ define(
progress = {phase: "copying", totalObjects: 10, processed: 1};
beforeEach(function () {
policyService = jasmine.createSpyObj(
'policyService',
[ 'allow' ]
);
policyService.allow.andReturn(true);
selectedObjectContextCapability = jasmine.createSpyObj(
'selectedObjectContextCapability',
[
@ -142,6 +149,7 @@ define(
copyAction = new CopyAction(
mockLog,
policyService,
locationService,
copyService,
dialogService,
@ -201,6 +209,7 @@ define(
copyAction = new CopyAction(
mockLog,
policyService,
locationService,
copyService,
dialogService,

View File

@ -34,6 +34,7 @@ define(
describe("Link Action", function () {
var linkAction,
policyService,
locationService,
locationServicePromise,
linkService,
@ -44,6 +45,12 @@ define(
newParent;
beforeEach(function () {
policyService = jasmine.createSpyObj(
'policyService',
[ 'allow' ]
);
policyService.allow.andReturn(true);
selectedObjectContextCapability = jasmine.createSpyObj(
'selectedObjectContextCapability',
[
@ -102,6 +109,7 @@ define(
};
linkAction = new LinkAction(
policyService,
locationService,
linkService,
context
@ -152,6 +160,7 @@ define(
};
linkAction = new LinkAction(
policyService,
locationService,
linkService,
context

View File

@ -34,6 +34,7 @@ define(
describe("Move Action", function () {
var moveAction,
policyService,
locationService,
locationServicePromise,
moveService,
@ -44,6 +45,12 @@ define(
newParent;
beforeEach(function () {
policyService = jasmine.createSpyObj(
'policyService',
[ 'allow' ]
);
policyService.allow.andReturn(true);
selectedObjectContextCapability = jasmine.createSpyObj(
'selectedObjectContextCapability',
[
@ -102,6 +109,7 @@ define(
};
moveAction = new MoveAction(
policyService,
locationService,
moveService,
context
@ -152,6 +160,7 @@ define(
};
moveAction = new MoveAction(
policyService,
locationService,
moveService,
context