[ACA-1272] Favorites - metadata permission (#288)

* allowableOperations field call option

* update unit tests
This commit is contained in:
Cilibiu Bogdan
2018-04-06 09:07:39 +03:00
committed by Denys Vuika
parent 8f3ccc7b38
commit ad6ec49777
2 changed files with 5 additions and 3 deletions

View File

@@ -98,7 +98,7 @@ describe('NodeInfoDirective', () => {
document.dispatchEvent(new CustomEvent('click'));
expect(nodeService.getNodeInfo).toHaveBeenCalledWith('id');
expect(nodeService.getNodeInfo).toHaveBeenCalledWith('id', { include: [ 'allowableOperations' ] });
});
@@ -116,6 +116,6 @@ describe('NodeInfoDirective', () => {
fixture.detectChanges();
tick();
expect(nodeService.getNodeInfo).toHaveBeenCalledWith('id3');
expect(nodeService.getNodeInfo).toHaveBeenCalledWith('id3', { include: [ 'allowableOperations' ] });
}));
});

View File

@@ -65,7 +65,9 @@ export class NodeInfoDirective implements OnInit {
this.loading = true;
this.apiService.getInstance().nodes
.getNodeInfo((<any>node.entry).nodeId || node.entry.id)
.getNodeInfo((<any>node.entry).nodeId || node.entry.id, {
include: ['allowableOperations']
})
.then((data: MinimalNodeEntryEntity) => {
this.node = data;
this.changed.emit(data);