Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
test/loginForTest: create test for app requesting permission to acces…
Browse files Browse the repository at this point in the history
…s other app's own container
  • Loading branch information
bochaco committed Jun 25, 2018
1 parent e818f8a commit 79d1c54
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ describe('Access Container', () => {
});
})));

it.only('request permissons for other app\' own container', async () => {
const primaryAppInfo = { id: 'primary', vendor: '1' };
const primaryApp = await createAuthenticatedTestApp(primaryAppInfo, {}, { own_container: true });
const perms = {
'apps/primary': ['Read']
};
const secondaryAppInfo = { id: 'secondary', vendor: '2' };
const secondApp = await createAuthenticatedTestApp(secondaryAppInfo, perms);
await secondApp.auth.getContainersPermissions();
});

it('returns empty object if no containers found for app', async () => {
const appWithNoContainers = await createAuthenticatedTestApp();
const noContainers = await appWithNoContainers.auth.getContainersPermissions();
Expand Down

0 comments on commit 79d1c54

Please sign in to comment.